You are on page 1of 6

System Modeling and Analysis

SystemVision for Embedded


Mechatronic Systems:
An Overview

Tom Egel
Mentor Graphics

w w w. m e n t o r. c o m / s y s t e m v i s i o n
ABSTRACT Using SystemVision with VHDL-AMS, the engineer-
The low cost of microcontrollers makes them increas- ing team can graphically create a virtual system proto-
ingly popular for electronic control of a wide range of type by interconnecting the various subsystem compo-
embedded systems. An embedded mixed-signal or nent models. The resulting system model can then be
mechatronic system is one that uses a microcontroller exercised at successive stages in the design process to
to control some physical aspect of the system such as determine if the system specifications are being met.
motion, speed, temperature, and so forth. The added
dimension of software presents a significant challenge EMBEDDED MECHATRONIC SYSTEM
to the design, integration and verification of this class DESIGN CHALLENGE
of systems. The challenge of embedded mechatronic system design is
the need to control the behavior of components contain-
This paper provides an overview of how SystemVision ing heterogeneous technologies. A typical embedded
by Mentor Graphics can be used for the design and mechatronic system is depicted in Figure 1.
verification of embedded mechatronic systems.
SystemVision utilizes the IEEE standard VHDL-AMS
language as the key technology for describing the
behavior of the physical hardware along with the con-
trolling software algorithm. The resulting unified sys-
tem model provides invaluable insight to the system
engineer throughout the design process

INTRODUCTION
As mechatronic system requirements become more Figure 1: Embedded mechatronic system
complex and demanding, the use of microcontrollers
These systems exist in many forms ranging from auto-
for more precise control continues to increase.
motive subsystems to industrial controls to consumer
Current system integration methods rely on the avail-
appliances. Common to each are sensors that convert
ability of the physical hardware and occur very late in
physical quantities to electronic signals, a microcon-
the design cycle. Any problems that arise at this time
troller for digital processing and actuators that produce
often result in expensive design or schedule changes.
a physical output from the processed information. The
Having a system model that incorporates both the
microcontroller adds the dimension of software into
hardware and software allows virtual system integra-
the overall system design process. Coordinating the
tion to occur well before the physical hardware is
development of hardware and software is a major chal-
available.
lenge to embedded mechatronic system design.

SystemVision by Mentor Graphics provides a hard-


SystemVision with VHDL-AMS is capable of model-
ware/software (HW/SW) co-verification environment
ing all aspects of embedded mechatronic systems rang-
for embedded mechatronic systems. The IEEE stan-
ing from physical hardware to the digital control algo-
dard VHDL-AMS language provides the mechanism
rithm and processor.
to combine the various technologies within embedded
mechatronic systems into a complete system model.

System Modeling and Analysis 1


HARDWARE MODELING WITH VHDL-AMS limited to an enumerated set of values (i.e. 0, 1, X, Z).
To be useful for the design, integration and verification
of embedded mechatronic systems, a modeling lan- VHDL is a well-established digital hardware descrip-
guage must provide constructs to accommodate the tion language fully capable of modeling all aspects of
wide array of technologies present. In addition, it digital electronics. The AMS extensions incorporate
must support both top-down design and bottom-up the necessary analog constructs making VHDL-AMS
verification methods. For system simulation to be the unifying glue that links these distinctly different
effective, detailed device models must co-exist with domains. This is a crucial requirement when modeling
high-level abstract models. embedded mechatronic systems.

MIXED-TECHNOLOGY MODELING
The ability to combine modeling abstractions within a
To fully understand an embedded mechatronic system,
single system model is one of the strengths of the
the non-electrical effects of the sensors, actuators and
VHDL-AMS language. In addition, the multi-technol-
plant must be considered. The successful conversion
ogy constructs in VHDL-AMS provide the ability to
of physical quantities into electrical signals (and vice
model analog and digital electronics interacting with
versa) involves having a full understanding of the
non-electrical components in a complete system
interaction between these technologies. Only with
model. The following sections briefly describe how
accurate models of these non-electrical devices com-
the VHDL-AMS language addresses the various
bined with the electronics entirely in a closed loop sys-
aspects of hardware modeling with the power and flex-
tem can proper analysis be achieved. Using VHDL-
ibility needed to solve complex system design and
AMS, system integration can begin before physical
analysis tasks.
hardware is available by creating a system model that
HIGH-LEVEL MODELING incorporates a combination of the technologies pres-
In the early stages of a top-down design process, high- ent. This may include the mechanical, magnetic,
level modeling techniques can provide useful insight hydraulic, thermal effects or any other domain that can
into the overall system performance. Signal flow or be described using algebraic or differential equations.
transfer function modeling techniques are used to
MODEL ABSTRACTIONS
describe the system at a purely mathematical level.
A key requirement for effective system modeling is
This method is useful for examining system perform-
the ability to describe the components at multiple lev-
ance issues like stability and for exploring compensa-
els of abstraction. This is particularly useful for top-
tion alternatives. VHDL-AMS provides constructs to
down design methods where the detail is added as the
create transfer function models in both the s-domain
system design progresses. VHDL-AMS provides a
and z-domain.
flexible modeling environment allowing the engineer
ANALOG, DIGITAL AND MIXED-SIGNAL MODELING to focus on the details of a specific part of the system,
In a typical embedded mechatronic system, the elec- include it in the context of the overall system design,
tronic hardware is often a combination of analog and and optimize the overall system simulation speed and
digital circuitry, each of which requires significantly accuracy.
different modeling techniques. Analog quantities are
continuous in time and can take on any value while As mentioned earlier, block diagram or signal flow
digital signals are discrete in time and are typically methods are often used early in the design definition

2 System Modeling and Analysis


process to describe major aspects of the system. These digitally based on the software algorithm stored in
models typically have inputs and outputs and data flow memory.
that is unidirectional. Conservative modeling tech-
Desired Setting
niques apply the laws of conservation at the connec-
tion points between models resulting in a more hard- Digital Control Algorithm

ware-oriented approach to modeling.


Analog / Digital DSP Algorithm
Converter (processor, MHz)
Analog feedback Digital output
The ability to combine both modeling techniques with- From To
Sensor Actuator
in a single system model is a key strength of the
VHDL-AMS language. It is uniquely positioned to Sampling
Control
Memory
(History)
address the hardware modeling needs of engineers (timer, KHz)

designing today's complex mechatronic systems. Implemented via software on


a microcontroller
VHDL-AMS provides the ability to use block diagram
methods for high-level modeling while selectively sub-
stituting physical hardware models as desired. C-code
Additionally, higher-level models can be incorporated
when using VHDL-AMS for bottom-up verification to Figure 2: Digital control algorithm
optimize the simulation speed and accuracy. Also
known as "checkerboard verification", this is only pos- The digital VHDL language provides numerous ways
sible with a modeling language capable of both signal to model the control algorithm. This includes an algo-
flow and conservative modeling. rithmic model in C or VHDL, an instruction set model,
and even a gate-level RTL model. An even further
MODELING THE MICROCONTROLLER level of verification could be devised by running the C
AND ALGORITHM code on the physical processor communicating with
In an embedded mechatronic system, the digital con- simulation models of the rest of the system. The abili-
trol algorithm is typically implemented in software and ty to perform a logical progression of successive veri-
targeted for a specific processor or microcontroller. fication steps allows the appropriate amount of detail
The ability to model this algorithm at different levels to be included in the microprocessor model as the sys-
of abstraction is a critical element of a systematic tem design progresses. More importantly, with
design methodology. The virtual integration of hard- SystemVision, these software models enable hardware
ware and software in a complete system model is the and software to be developed in parallel throughout
key to HW/SW co-verification of an embedded the design process.
mechatronic system.
HW/SW DESIGN METHODOLOGY
MODELING ABSTRACTIONS
A significant challenge in designing embedded mecha-
The basic structure of a digital control algorithm is
tronic systems is the integration of the hardware and
shown in Figure 2. In an embedded mechatronic sys-
software. In the absence of HW/SW co-verification
tem, the analog feedback from the sensor is sampled
tools, the software and various hardware design teams
and converted to a digital word by the A/D converter.
must work in isolation with minimal communication.
The processor receives this information, compares it to
Software design involves developing a control algo-
some internal or external reference and manipulates it

System Modeling and Analysis 3


rithm based on the system performance specification, cation. The typical design cycle is much more
coding this in a high-level language, converting to detailed, usually involving several design iterations
assembly code, and compiling on a target processor. and even ranges beyond final certification into
The hardware design as described above involves a release of design updates.
mix of technologies and is also evolving until it is
SystemVision can be used throughout the design
merged with the software during system integration.
process as a virtual system integration solution for
embedded mechatronic systems. The solution can
As a result, the true system operation is not known
be used to successively verify the software control
until the first physical prototype is built. System inte-
algorithm as the system design progresses and as
gration at this late stage in the design cycle often
hardware changes occur. This approach provides a
results in problems due to unanticipated interactions
structured method of ensuring successful system
between the hardware and software. Software delays
integration well before the prototype stage.
can affect system stability, and hardware tolerance
stackups can affect the signal delivery and system per- SUMMARY
formance. The microcontroller and algorithm models This paper has presented an overview of the capabili-
mentioned in the previous section enable a methodolo- ties of SystemVision with VHDL-AMS for embedded
gy for debugging and verifying the software within the mechatronic system design and verification. The com-
context of the hardware at each phase of the system bination of software used to control heterogeneous
design. These techniques enable an engineer to suc- hardware in this class of systems presents a unique set
cessively verify the design, allowing the engineering of challenges for the engineering team. A successful
team to confirm system performance at critical stages design depends on an understanding of how these
of the design process. The simplified "V" diagram in technologies interact within the context-complete sys-
Figure 3 can be used to illustrate how to apply these tem. These interactions are often not fully realized
techniques throughout the design cycle. until the system prototype stage. Unfortunately, prob-
lems uncovered this late can be difficult and costly to
Specify Validate correct. The VHDL-AMS modeling language pro-
vides a unifying technology for the design and integra-
tion of all aspects of embedded mechatronic systems.
The power and flexibility of VHDL-AMS make it suit-
Design Verify
able for designing mechatronic systems using block
diagram methods or circuit simulation techniques and
for both top-down design and bottom-up verification.
Implement

Figure 3: “V” diagram

As the design definition progresses toward imple-


mentation, more detailed models can be utilized to
ensure proper functionality. After implementation,
the system model is used to verify the design per-
formance and validate it against the original specifi-

4 System Modeling and Analysis


REFERENCES
[1] T.R. Egel, N.J. Elias, "Using VHDL-AMS as a
Unifying Technology for HW/SW Co-Verification of
Embedded Mechatronic Systems", SAE 2004 World
Congress.
[2] N.J. Elias, "Instruction Set Modeling of Micro-
Controllers for Power Converter Simulation", APEC
2003.
[3] P.J. Ashenden, G.D. Peterson, D.A. Teegarden,
"The System Designer's Guide to VHDL-AMS",
Morgan Kaufmann Publishers, 2002.
[4] Cooper, R. S., "The Designer's Guide to Analog
and Mixed-Signal Modeling", Avant! Corp, 2001
Morgan Kaufmann Publishers, 2002.

For more information, call us or visit: www.mentor.com/systemvision


Copyright © 2004 Mentor Graphics Corporation. This document contains information that is proprietary to Mentor Graphics Corporation and may be duplicated in whole or in part by the original recipient for
internal business purposed only, provided that this entire notice appears in all copies. In accepting this document, the recipient agrees to make every reasonable effort to prevent the unauthorized use of this
information.

Corporate Headquarters Silicon Valley Europe Pacific Rim Japan


Mentor Graphics Corporation Mentor Graphics Corporation Mentor Graphics Mentor Graphics Taiwan Mentor Graphics Japan Co., Ltd.
8005 S.W. Boeckman Road 1001 Ridder Park Drive Deutschland GmbH Room 1603, 16F, Gotenyama Hills
Wilsonville, Oregon 97070 USA San Jose, California 95131 USA Arnulfstrasse 201 International Trade Building 7-35, Kita-Shinagawa 4-chome
Phone: 503-685-7000 Phone: 408-436-1500 80634 Munich No. 333, Section 1, Keelung Road Shinagawa-Ku, Tokyo 140
North American Support Center Fax: 408-436-1501 Germany Taipei, Taiwan, ROC Japan
Phone: 800-547-4303 Phone: +49.89.57096.0 Phone: 886-2-27576020 Phone: 81-3-5488-3030
Fax: 800-684-1795 Fax: +49.89.57096.400 Fax: 886-2-27576027 Fax: 81-3-5488-3031

You might also like