The present invention relates to a method for converting a representation of a system into a model of a system.
In systems designs, it is often necessary to convert a schematic diagram or representation of a system, such as a circuit diagram, into a model.
Schematic diagrams, or designs, are mostly only available in hardcopies or in digital image formats. Modern computer-aided design tools require schematic models in specifically defined file formats. Currently, in order to preserve, re-use and modify schematic designs in hardcopies or digital images, an engineer must manually import the designs into a computer in a machine-compatible model format. This process requires substantial time, resource and expertise.
The invention is defined by the appended independent claims to which reference should now be made. Optional features are defined in the appended dependent claims.
Embodiments of the invention will now be described with reference to the accompanying drawings, in which:
Although the invention has been described above with reference to one or more preferred embodiments, it will be appreciated that various changes or modifications may be made without departing from the scope of the invention as defined in the appended claims.
Referring to the drawings,
The invention can be embodied in a tool which consists of five main modules: component library import, preliminary processing, Hough transform-based component detection, feature-based component detection, and model export.
The library includes properties relating to each of a plurality of components. Such properties include a component name, an image showing how the component might be portrayed in a schematic diagram, the number and form of any inputs and outputs of the component, the functional and abnormal states of the component, and the failed events of the component that can be triggered. A description or definition of the functional state of the component defines how the component behaves during its normal use. For example, this might define how the function of the component affects the input, resulting in the output. A description or definition of abnormal states of the component or of possible failure events that could occur in or to the component defines what might cause the component to fail, and the consequences of that component failing. For example, the definition might state that the component is capable of functioning when supplied with a current up to a predetermined maximum but, at currents exceeding that predetermined maximum, the component shuts down in order to avoid damage occurring. The behavioural information about each component includes details regarding how the component functions and behaves when connected in a system. The behavioural information may include information relating to how the inputs of the component are transformed by logic operators to affect the value of the outputs, how the values of the inputs may cause the component to change its functional configuration state, how the functional configuration state may affect the value of the outputs, how the triggering of a failure event represents how the component might fail, how the component failure affects the component output values, how the values of the inputs may affect the normal or failed behaviour of the component, and how the component outputs might affect the system. In one embodiment, the nominal and failed behaviour of the component is captured in a language called AltaRica, developed by Labri. The information relating to the inputs, states, events, and the code that describes the relationships between the inputs, states, events and how this affects the values of the outputs of the components forms the behavioural information of the component. As in any formalism, the inputs, constants, variables, and outputs have a data type definition. The basic data type definition can be of Boolean, Integer, Real and Enumerated types. The structured data type definition can be any number of combinations of the basic data types. In one embodiment, each component has a single set of behavioural information associated with it. In other embodiments, one or more components have more than one set of behavioural information associated with them. A user is able to select a set of behavioural information for each component based on the requirements of the system or the analysis that they are intending to perform.
The behavioural information relating to each component includes nominal behaviour attributes and failure behaviour attributes. The nominal behaviour attributes describe the way the component functions in a system. The failure behaviour attributes describe conditions that would lead to a failure condition of the component.
The library is editable by a user, so that if needed, a user is able to enter a new set of behavioural information for one or more components. In one embodiment, if, during testing of a system by simulation, a component is caused to fail, for example as a result of too great a current passing through it, then the behavioural information output for that component will be updated as a consequence of the failure. In this way, the library can be considered to be dynamic.
The schematic image to be used as an input image can be coloured, grey-scale or binary. Any colour or grey-scale information will be removed, since the image is converted to binary (black and white) in a pre-processing step 204. The image is then treated as black and white.
The user is then given the option to choose which algorithm is to be used for vision-based component recognition 206. In one embodiment, the user can select from two algorithms: Hough transform-based component recognition and feature-based component recognition. In an alternative embodiment, the tool incorporates more algorithms which can be selected by the user if needed. Both of the above-mentioned component recognition algorithms adopt some schemes for handling invariant detection in different orientations.
The initial detection of components is carried out at the whole image level. The resulting image is displayed in the graphic frame, and the detected component is listed in the component frame in a tree structure. The user is prompted to check whether the component recognition is correct (step 208). If the user finds errors in the detected components, for example if the recognition algorithm has incorrectly identified a component, then the incorrectly-identified component can be corrected, or deleted from the tree altogether. The recognition algorithm improves its recognition of the components in systems each time an identification correction is made.
When the user selects one component in the component tree, its properties are displayed in the attribute frame. If the user notices any incorrect property values, these can be corrected manually (210).
In some cases, components are more difficult to detect at a whole-image scale. The tool allows the user to select a small region in the input image and gives a list of all potential components in the region for the user to select the correct one (212).
When the user is satisfied that the component detection has been completed successfully, conversion to the model can be carried out (214).
The resulting model is a behavioural model which can be used by an engineer to build and/or test a system. The resulting model can be exported in a suitable file format such as XML. In one embodiment, the result is exported in a compatible .exp format for Cecilia OCAS.
In one embodiment of the present invention a general Hough transform algorithm is implemented for component detection. The Hough transform is a technique which can be used to isolate features of a particular shape within an image. Because it requires the desired features to be specified in some parametric form, the classical Hough transform is most commonly used for the detection of regular curves such as lines, circles and ellipses. A general Hough transform, instead, is employed in applications where a simple analytic description of a feature is not possible. In the case of component detection in schematic diagrams, there is no standard shape or pattern for each component. Therefore, only the general Hough transform is suitable. The main advantage of the Hough transform technique is that it is tolerant of gaps in feature-boundary descriptions and is relatively unaffected by image noise.
A few preliminary processing steps are required before the Hough transform-based detection is carried out.
Once an inverted image is obtained, a general Hough transform is performed on the image, and a relevance score is given for points which are potentially similar to the target component icon.
An input schematic diagram may be hand-drawn or taken from a scanner, and it is likely that the input image will be affected by noise and degradation. Reference symbols of components in the component library (represented as an image) have fixed scale and orientations. These images may also be degraded.
The input image 502 first undergoes a pre-processing step 504 to detect rectangular shapes. Components which are rectangular in shape are detected and segmented based on morphological dilation and erosion. The result of this step is a simplified image 506.
The next step is the detection of components based on feature vectors. The simplified image obtained from the previous step undergoes a hybrid detection method 508 which combines local intensity-based feature recognition and structure-based feature recognition to detect components with “irregular” shapes.
The detection of irregularly-shaped components is based on a combination of a local ‘speeded up robust feature’ (SURF) and a shape context-like feature.
One skilled in the art will appreciate that component recognition techniques other than those described above can be used for detecting and recognising components in the input schematic.
In one embodiment, the present invention can be implemented in a Java-based application. The invention provides a schematic-to-model transformation tool (S2MT) for the automatic translation of hydraulic images into model formats compatible with Cecilia OCAS.
In order to enhance the recognition performance as much as possible, the proposed design of the S2MT tool provides several options for the user to develop the best conversion performance. The tool comprises two different vision-based algorithms for the recognition process, together with orientation invariant solutions, user feedback and revision functions, library modification, and global/regional recognition. In addition, an interactive graphical user interface is provided to assist the process.
So far, the invention has been described in terms of individual embodiments. However, one skilled in the art will appreciate that various embodiments of the invention, or features from one or more embodiments, may be combined as required. It will be appreciated that various modifications may be made to these embodiments without departing from the scope of the invention, which is defined by the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
1116440.7 | Sep 2011 | GB | national |