Вы находитесь на странице: 1из 205

SystemVision

An Introductory Workshop

Version 4.2

Create - a model of your system using a powerful language standard


Simulate - complex interactions
Analyze - understand and optimize your design

www.mentor.com/systemvision
SystemVision
An Introductory Workshop

Version 4.2

Create - a model of your system using a powerful language standard


Simulate - complex interactions
Analyze - understand and optimize your design

www.mentor.com/systemvision
SystemVision Overview

Workshop Quick Overview

Workbook Overview/References
SystemVision Basic Features
Presentation
Hands-on Exercise
SystemVision Parametric Analyses
Presentation
Hands-on Exercise
SystemVision Symbols and Models
Presentation
Hands-on Exercise
Application Examples
Unmanned Aerial Vehicle (UAV) Presentation
Hands-on Exercise: UAV Mixed-Signal (Case Study 1)
Hands-on Exercise: UAV Mixed-Technology (Case Study 2)
Hands-on Exercise: UAV Power Converter (Case Study 3)
Hands-on Exercise: UAV Communications (Case Study 4)
Hands-on Exercise: UAV System (Case Study 5)

Copyright Mentor Graphics Corporation 2005 2


SystemVision Overview

Table of Contents

Workshop Objectives.................................................................................................. 5
Workshop Objectives 5
Prerequisites 5

Workshop Overview and References.......................................................................... 6


What We Will Cover: 6
SystemVision Reference Material 6
VHDL-AMS Reference Material 7

Introduction to SystemVision..................................................................................... 9

SystemVision Basic Features.....................................................................................19

Lab Getting Started with SystemVision................................................................. 30


Simulate a Simple RLC Circuit 30
Create and Simulate a New Design 39
Lab Summary 47

Glossary of Terms ..................................................................................................... 50

SystemVision Parametric Analyses........................................................................... 53

Lab Perform Parametric Analyses ......................................................................... 66


H-bridge Motor Controller 66
Sensitivity Analysis 73
Monte Carlo Analysis 77
Lab Summary 89

SystemVision Symbols and Models...........................................................................91

Lab Creating Symbols and Models.......................................................................109


Generate PWM Symbols for UAV Propeller System 109
Use the Model Wizard to Create Propeller Models 115
Lab Summary 124

Unmanned Aerial Vehicle (UAV) Introduction ......................................................125

Case Study 1: The Airplane Controller System ....................................................... 151

Case Study 2: The Rudder System...........................................................................157


Control Block Rudder System 160
Mixed Electro-mechanical Rudder System 162
Mixed SPICE/VHDL-AMS Rudder System 163

Copyright Mentor Graphics Corporation 2005 3


SystemVision Overview

Rudder System with Z-Domain Servo 166

Case Study 3: The Power Converter System........................................................... 171


tb_buckconverter testbench 173
tb_buckconverter_hier testbench 175
tb_compensator testbench 178
CS3_buckconverter testbench 180

Case Study 4: The Communications System..........................................................185


tb_bfsk 187
tb_CommSys_Det 189
tb_CommSys_PLL 191

Case Study 5: The RC Airplane System...................................................................195


Airplane Command & Controller with Rudder System 197
Airplane Propeller System 199
Airplane with Human in the Loop 201

Copyright
Copyright Mentor Graphics Corporation 2005. All rights reserved. The contents of this
training material may not be duplicated without prior written approval from Mentor
Graphics Corporation.

Copyright Mentor Graphics Corporation 2005 4


SystemVision Overview

Workshop Objectives

The purpose of this workshop is to familiarize students with the SystemVision System
Modeling Solution. This and other related material is available at the Mentor Graphics web
site: http//www.mentor.com/systemvision/.
Workshop Objectives
As a minimum, students should come away from this training class with:
A basic ability to create and simulate designs using SystemVision
Simulation fundamentals
An understanding of the types of systems that can be developed and analyzed using
SystemVision
Prerequisites
General knowledge of electrical engineering is required
Simulation experience is not required

Copyright Mentor Graphics Corporation 2005 5


SystemVision Overview

Workshop Overview and References

Welcome to SystemVision: An Introductory Workshop. This workshop is intended cover the


major capabilities of the SystemVision System Modeling Solution.
What We Will Cover:
SystemVision Overview
Here we will briefly define what SystemVision is, and some concepts associated with
it.
SystemVision Basic Features
In this portion of the course, we concentrate on the most commonly used features
of SystemVision. A hands-on lab will be performed covering many of these features.
SystemVision Parametric Analysis
In this portion of the course, we concentrate on some of the more advanced features
of SystemVision, such as Monte Carlo analysis, Parameter Sweeps, and Sensitivity
analysis. A hands-on lab will be performed covering selected features.
SystemVision Symbols and Models
In this portion of the course, various methods for using existing VHDL-AMS and
SPICE models are presented, as well as generating symbols for such models when
necessary. In addition, developing new VHDL-AMS models with the Model Wizard
is discussed.
SystemVision Application Examples
In this portion of the course, several application examples developed in
SystemVision will be presented, and several underlying models will be briefly
discussed. Hands-on labs will be performed on selected examples.
The following sources of information can be used to aid in completing any of the labs in this
workbook. Many of these sources are available with the SystemVision software.
SystemVision Reference Material
Help > SystemVision Help Topics
This is the main SystemVision online help resource with hyperlinks. Topics include:
Introduction to SystemVision, The User Interface, SystemVision Commands, a
collection of How Do I...? tips, Reference Information, as well as Examples,
Tutorials, and Demos.
Help > SystemVision Online Manuals > Getting Started
The Getting Started tutorial is provided to acquaint users with SystemVision. It is
recommended that users run through this tutorial prior to running other examples.

Additionally, a self-running demo of the Getting Started tutorial is available from the
SystemVision Welcome screen.

Copyright Mentor Graphics Corporation 2005 6


SystemVision Overview

Help > SystemVision Online Manuals > User's Manual


The Users Manual is a reference source for SystemVision features and operation.
Detailed explanations of tool usage are provided.
Help > SystemVision Online Manuals > SystemVision Quick Reference Guide
This guide provides common tool usage instructions in a compact format. We
recommended that users print a copy of this guide as a handy reference for running
SystemVision examples.
The Waveform Viewer's Quick Start document provides an overview of all the basic
features of the Waveform Viewer. It is accessed from within the Waveform Viewer:
Help > Quick Start.

The Waveform Viewer's Tutorial presents an example-driven tour of the basic features
available with Waveform Viewer. It is accessed from within the Waveform Viewer:
Help > Tutorial > Open Tutorial.

VHDL-AMS Reference Material


The System Designer's Guide to VHDL-AMS (P. J. Ashenden, G. D. Peterson, D. A.
Teegarden - ISBN 1-55860-749-8, published by Morgan-Kaufman Publishers, 2002)
is a comprehensive textbook for the VHDL-AMS modeling language.
The Designers Guide to Analog & Mixed-Signal Modeling (R. S. Cooper - ISBN 0-
9705953- 0-1, published by Avant!, 2001) includes numerous model examples in
both the VHDL- AMS and MAST modeling languages.

Recently reprinted in PDF form by Synopsys Corporation, this book is available


from the Synopsys website.
The Fundamentals of VHDL-AMS for Automotive Electrical Systems is intended as a one
day application-oriented modeling workshop. It is available from Mentor Graphics at
the SystemVision website.
The VHDL-AMS Quick Reference Guide offers a summary of many VHDL-AMS
language features and syntax. It is accessed from within SystemVision: Help > Manuals
> VHDL-AMS Quick Reference.

Copyright Mentor Graphics Corporation 2005 7


SystemVision Overview

Introduction to SystemVision

The SystemVision
System Modeling Solution

Instructor Notes/Comments
SystemVision is a general purpose analog, digital, mixed-signal, mixed-
technology simulation environment. This presentation is meant to be an
introduction to the SystemVision System Modeling Solution.

Copyright Mentor Graphics Corporation 2005 9


SystemVision Overview

Gaps in Current Design Tools


? F1
Conceptual I/O
F2
I/O

Requirements Specification s +b
Cascade G2 ( s ) = k
Compensation s + a
Plant
+
S1 S2 S4
Architectural
S3 +
G2(s)
System Partitioning Feedback Compensation
H(s)

GAP ????

? ? ? ? ? R1
CFB

RFB

Component R2
OpAmp
Detailed Design Motor

Load

GAP Enc.

SystemVision System Modeling


Modeling Solution

Instructor Notes/Comments
Designing complex systems often requires designers to represent the system at various levels
at different stages of the design. These levels can be represented by a pyramid. The tip of
the pyramid represents the Conceptual or Requirements Specification level, where abstract
ideas are tested, as well as some interface ideas.
The next level in the pyramid is the Architectural or System Partitioning level, where the
designer begins to compartmentalize design ideas, using state machines and transfer
functions
Eventually, the designer makes it to the Component level, where the detailed design is
actually implemented with real parts. In many of todays systems, these parts can consist of a
mix of analog and digital electrical components, as well as mechanical, electro-mechanical,
magnetic, electro-magnetic, and other mixed-technology components.
Additionally, designers are adding more and more software into such systems, sometimes at
all levels of the design!
Of course, designers need simulation tools to accomplish these system designs.
Unfortunately, there are GAPs between what the designers need, and what the tools
typically have to offer.
There are tools for the higher levels, and tools for the component level, but not from the
high level to the component level.

Copyright Mentor Graphics Corporation 2005 10


SystemVision Overview

SystemVision Fills the Gaps


? F1
Conceptual I/O
F2
I/O

Requirements Specification s +b
Cascade G2 ( s ) = k
Compensation s + a
Plant
+
S1 S2 S4
Architectural
S3 +
G2(s)
System Partitioning Feedback Compensation
H(s)

Architectural Component

GAP Functional (abstract) (detailed)


????
CW CCW

Combine All +
G(s) PWM
M J
Levels
CCW CW

? ? ? ? ? H(s)

R1
CFB

RFB

Component R2
OpAmp
Detailed Design Motor

Load

GAP Enc.

SystemVision System Modeling


Modeling Solution

Instructor Notes/Comments
SystemVision was specifically designed to fill the gap:
- Across technology-type boundaries
- Across all levels of abstraction, including the all-important Functional level.
- And across the software/hardware boundary

Copyright Mentor Graphics Corporation 2005 11


SystemVision Overview

What is SystemVision?
CFB
R
RFB
R1

R2
OpAmp

Motor Motor C

Load
System Component
Model Models
Enc.

VHDL- Mixed-
AMS Signal
Component Models
Simulator
Core
SPICE Multi- Modeling Formats
& Domain
C
VHDL-AMS : E == m*c**2;
Results
SPICE :
m
E
c x2 c2

C Language : E = m*pow(c,2);

SystemVision System Modeling


Modeling Solution

Instructor Notes/Comments
At the core of SV lies an extremely powerful and versatile simulation engine,
which accepts mixed-signal, mixed-domain (mixed-technology) as well as multi-
language formats.
Lower-Right: SV is supported by three language pillars: VHDL-AMS, the C
programming language, and SPICE formats. This allows for convenient use of
existing models, as well as ease of development of new models in standardized
formats.
Upper-Right: Models for any of these formats can be attached to graphical
symbols, which are often stored in symbol libraries.
Upper-Left: These symbols are used to graphically construct designs. These
graphical designs are read into the SV core, and simulated per the user's
specifications.
Lower-Left: SV simulates the given design, and produces user-friendly
waveforms which can be measured and analyzed.

Copyright Mentor Graphics Corporation 2005 12


SystemVision Overview

Graphical Design
What is SystemVision?
CFB Model Libraries
R
RFB
R1

R2
OpAmp

Motor Motor C

Load
System Component
Model Models
Enc.

VHDL- Mixed-
AMS Signal
Component Models
Simulator
Data Analysis & Viewing Core
SPICE Multi- Modeling
Model Creation Formats
& Domain
C
VHDL-AMS : E == m*c**2;
Results
SPICE :
m
E
c x2 c2

C Language : E = m*pow(c,2);

SystemVision System Modeling


Modeling Solution

Automotive Electrical System


Mixed-Signal/Mixed-Technology

SystemVision System Modeling


Modeling Solution

Copyright Mentor Graphics Corporation 2005 13


SystemVision Overview

Electronic Fuel Injector


Multi-Language/Mixed-Technology
VHDL-AMS

SPICE

SystemVision System Modeling


Modeling Solution

Basic Motion Control System


Mixed-Signal/Mixed-Technology

SystemVision System Modeling


Modeling Solution

Copyright Mentor Graphics Corporation 2005 14


SystemVision Overview

Advanced Motion Control


Multi-Language/Mixed-Signal/Mixed-Technology
C VHDL-AMS/SPICE
DSP Controller CRPWM Motor Driver Induction
Transform ia
w cmd + P-I
ieqs a +

P-I a Motor
ie->is b +
P-I b
ib
ieds c

dq->abc +

P-I c ic Te

Profile Cmd
Angle Encoder/
Command Tachometer T load
k
s
Slip + + Scale wr
Calc Factor

SystemVision System Modeling


Modeling Solution

Unmanned Aerial Vehicle


Hierarchical Design/Mixed-Signal/Mixed-Technology
Unmanned Aerial Vehicle

SystemVision System Modeling


Modeling Solution

Copyright Mentor Graphics Corporation 2005 15


SystemVision Overview

Unmanned Aerial Vehicle


Hierarchical Design/Mixed-Signal/Mixed-Technology
Unmanned Aerial Vehicle

Encoder

Time-Division Multiplexer

Parity Generator

SystemVision System Modeling


Modeling Solution

SystemVision = System Modeling


Span multiple levels of system abstraction
Conceptual
Powerful Benefits Requirements Specs

Multi-Technology Architectural
Multi-Language System Partitioning

Mixed-Signal
Functional
Combine All Levels

Component
Detailed Design

across multiple technologies.

SystemVision System Modeling


Modeling Solution

Copyright Mentor Graphics Corporation 2005 16


SystemVision Overview

SystemVision System Modeling


Modeling Solution

Copyright Mentor Graphics Corporation 2005 17


SystemVision Basic Features

SystemVision Basic Features

In this section, we will focus on some of the basic features of SystemVision. These features
include DC (Operating Point) analysis, as well as transient (time-domain) and AC
(frequency-domain) analyses.
The Waveform Viewer will also be introduced, and basic instructions for viewing various
waveforms will be given. Additionally, the Measurement Tool and the Waveform Calculator
will be briefly introduced.

SystemVision
Introduction and Basic Features

Copyright Mentor Graphics Corporation 2005 19


SystemVision Basic Features

SystemVision Basic Features

Simulation Analyses
DC (Operating Point)
Transient (Time-domain)
AC (Frequency-domain)
Viewing/Post-Processing Results
Waveform Viewer
Basic Measurements

SystemVision Introduction and Basic Features 2

Welcome Page

Open new Website


or existing Links
projects

Getting
Started Additional
.pdf file Help

Examples
Access with
Welcome Tab

SystemVision Introduction and Basic Features 3

Copyright Mentor Graphics Corporation 2005 20


SystemVision Basic Features

Main Interface
Project tab Schematic SystemVision
Contains Toolbar Toolbar
Schematics

Main Window:
Schematics
Model files
Symbols

Simulation Tab
Contains
input/output
Files

Use Tabs to
Select window
Output
Transcript
Window

SystemVision Introduction and Basic Features 4

Creating a Design

SystemVision Introduction and Basic Features 5

Copyright Mentor Graphics Corporation 2005 21


SystemVision Basic Features

Symbol Library
Selected Symbol

Symbol List

Symbols local to Project

VHDL-AMS
Symbol Libraries Symbol Preview

SPICE
Symbol Libraries

Place symbol

SystemVision Introduction and Basic Features 6

Edit Model Properties


General Tab
Choice of Simulation Model Types
VHDL
SPICE (.subckt)
Compiled Library
Schematic
Name

Choice of Multiple Architectures


Entity name
Parameters Tab

Entity and Architecture


File Names

Model Parameters
(VHDL-AMS Generics)

SystemVision Introduction and Basic Features 7

Copyright Mentor Graphics Corporation 2005 22


SystemVision Basic Features

Running a Simulation

SystemVision Introduction and Basic Features 8

Simulation Controls
Simulations Tab
Simulations Tab
3 main analysis sections

Operating Point (DC)


Analysis

Frequency (AC)
Analysis

Time Domain (Transient)


Analysis

SystemVision Introduction and Basic Features 9

Copyright Mentor Graphics Corporation 2005 23


SystemVision Basic Features

Simulation Controls
Results Tab
Results Tab

Load/Append/Replace waveforms
Results
Database
Name

Enable
Annotation
To Schematic
Expand
Hierarchy

Select desired
waveforms
Select individual
signals

SystemVision Introduction and Basic Features 10

Viewing/Post-Processing
Results

SystemVision Introduction and Basic Features 11

Copyright Mentor Graphics Corporation 2005 24


SystemVision Basic Features

DC Back Annotation
Click Show/Hide
Back Annotation
to toggle on/off

DC values appear
on schematic

SystemVision Introduction and Basic Features 12

Waveform Viewer Basics

Graph window
Waveform List
(Waveform Display pane)

Signal pane

Tree/List tabs

SystemVision Introduction and Basic Features 13

Copyright Mentor Graphics Corporation 2005 25


SystemVision Basic Features

Waveform Viewer Basics


Preserves
Design
Hierarchy

Drag and
Drop
To plot
Signal
Type
Plot analog
Indicators
or digital
Signals

Domain
Units
Preserved

Auto-loads
Current
Database

Access
Additional
Workspaces

SystemVision Introduction and Basic Features 14

Waveform Viewer Post-Processing


Waveform Measurement
Calculator Tool

Add Multiple
Cursors

Annotate
Measurement
Results

Cursors Display
X and Y Values

SystemVision Introduction and Basic Features 15

Copyright Mentor Graphics Corporation 2005 26


SystemVision Basic Features

Waveform Measurements
Example: Risetime

Select Measurement Select Measurement


from list
category

Select source waveform(s)


from graph window

Select thresholds
(optional)

Annotate to graph
or create new
waveform

Select X range
(optional)

Click Apply to
Perform Measure

SystemVision Introduction and Basic Features 16

Waveform Calculator

Equation Stack

Input Waveform
Advanced Functions
(more in View menu)

Standard
Functions Plot to Active Graph

SystemVision Introduction and Basic Features 17

Copyright Mentor Graphics Corporation 2005 27


SystemVision Basic Features

Symbol and Model Libraries

SystemVision Introduction and Basic Features 18

VHDL-AMS Model Library


EduLib

Open-source
User can read and/or edit
Educational
Includes examples from all natures
Pre-compiled
To speed up simulation
Includes symbols
Continually growing

SystemVision Introduction and Basic Features 19

Copyright Mentor Graphics Corporation 2005 28


SystemVision Basic Features

SPICE Component Library

SystemVision contains large database


(>18,000) of SPICE symbol and model
libraries
Accessible using DxDatabook
Provides grouping, filtering and search
mechanisms
Can merge with existing corporate database
within DxDatabook

SystemVision Introduction and Basic Features 20

Lab RLC Design

In this lab, you will use SystemVision to


create and simulate a simple RLC design.
L1
vinput R1 vmid vload

vpulse1 C1

SystemVision Introduction and Basic Features 21

Copyright Mentor Graphics Corporation 2005 29


SystemVision Basic Features

Lab Getting Started with SystemVision

SystemVision provides simulation capability for mixed-signal and mixed-technology (multi-


physics) designs. Models and modeling techniques from VHDL-AMS, VHDL, C, and
SPICE formats are supported.
This section of the workshop provides basic information on how to begin using
SystemVision. As you use this information, feel free to experiment with product features and
functions not explicitly covered.
The first exercise shows how to run a simulation on an example that is included as part of
the SystemVision installation. The design is a simple electrical circuit consisting of a resistor,
inductor, and capacitor (RLC) supplied from the EduLib model library provided with
SystemVision.
This exercise covers the following tasks:
Open an existing project
Set up and run a simulation
View results in the SystemVision Waveform Viewer
Simulate a Simple RLC Circuit
This exercise shows how to invoke SystemVision, open an existing design as a project,
perform some basic operations, and explore the user interface.
Design Selection/Viewing/Editing
1. Select one of the following methods and invoke SystemVision.

When you install SystemVision, the installation program creates two ways with which
it may be invoked:
Windows Start Menu.

Start > All Programs > Mentor Graphics SystemVision > SystemVision Professional 4.2

The desktop icon.

Double-click on the SystemVision icon.


2. Close the Hint dialog (if necessary).
3. Select File > Open > Project and browse to the Introduction_RLC/RLC folder (the
instructor will provide the location of this folder).
4. Double-click on the ex_rlc.dproj file. This opens the ex_rlc project into SystemVision.
5. Expand the project hierarchy.
a) At the top of the Project Navigator Tree, click the Simulation tab. Note the [+]
indicator to the left of the TestBenches and Model Libraries for this project.

Copyright Mentor Graphics Corporation 2005 30


SystemVision Basic Features

b) Click the [+] next to TestBenches. The testbench listing is expanded and the
contents of the testbench are displayed.
c) Under TestBenches, click [+] next to ex_rlc [ACTIVE].
The listing of files associated with this testbench are shown in Figure 1.

Figure 1 - Project Navigator Showing Design Hierarchy.

6. Open the schematic for this design.


a) Under TestBenches, double-click ex_rlc [ACTIVE], which displays the schematic for
this design. The schematic should appear as shown in Figure 2.

R L
vinput vmid vload

vpulse C

Figure 2 - RLC Schematic.

b) (Optional) Click the zoom icons in the View Toolbar to adjust the size of the
display.
Time-domain Analysis
1. Specify the simulation settings.
a) Choose Simulation > Simulate from the menu bar. This displays the Simulation
Control dialog box shown in Figure 3. This dialog box provides four tabs:
Simulations, Results, Multi-Run, and Advanced. When you click on a different
tab, the dialog box changes to provide different simulation settings.

Copyright Mentor Graphics Corporation 2005 31


SystemVision Basic Features

Note: Schematic netlisting and model compiling are automatically performed


when you run the Simulate command. Alternatively, you can run Netlist or
Compile commands manually if desired.

Figure 3 - Simulation Control Simulations Tab.

b) In the Simulations tab:


i) Enable Operating Point Analysis and Time-Domain Analysis by clicking in
their respective check boxes.
ii) Under Time-Domain Analysis, type the following value:

End Time: 20ms (or 20m)


2. Specify results settings.
a) Click the Results tab. The Results dialog appears as shown in Figure 4.

Copyright Mentor Graphics Corporation 2005 32


SystemVision Basic Features

Figure 4 Simulation Control Results Tab.

b) The Results tab specifies that the simulation waveforms will be stored in a
database called ex_rlc, and that All Waveforms for the Time-domain analysis will
be stored in this database (individual waveforms can be selected as well).
3. Run the simulation for operating point and time domain analyses.
a) Click OK. This begins the following simulation analyses on the active testbench
(ex_rlc) shown in the Project Navigator:
Operating point analysis
Time domain analysis
b) When the simulation is complete, SystemVision launches the Waveform Viewer
in a separate window, shown in Figure 5. Note the Waveform List, which shows
a hierarchical list of signals for each design element in the testbench.

Copyright Mentor Graphics Corporation 2005 33


SystemVision Basic Features

Figure 5 - SystemVision Waveform Viewer/Analyzer.

4. View results of the time domain analysis.


a) In the Waveform List, double-click on the vload signal. It should appear as shown
in Figure 6. (Alternatively, you can select a waveform from the list and drag-and-
drop it into the graph window.)

Note that in the figure the background color has been set to white to allow
waveforms to be easily viewed when printed.

Figure 6 - Display of vload from Time-domain Analysis.

Copyright Mentor Graphics Corporation 2005 34


SystemVision Basic Features

To zoom in on an area, click and hold the left mouse button to create a
rectangular bounding box. You can stretch this box to surround the portion of
the display you want to zoom.
To display a popup menu for zooming and placing waveform cursors, move the
mouse cursor away from any portion of the waveform and then click the right
mouse button.

You can use this menu to practice zooming the display and using waveform
cursors. Note that the F5 key also creates waveform cursors. To move a
waveform cursor, click on it and drag it to a desired location. To delete a
waveform cursor, click on it and press F5.
To display a popup menu for waveform properties, move the mouse cursor over
any portion of the waveform and click the right mouse button.
To delete a waveform from the display, click on its name in the waveform Signal
pane and click the Delete icon in the toolbar.
5. Perform Overshoot Measurement.
a) Select Tools > Measurement Tool from the menu.
b) Select Overshoot from the drop-down menu located to the far right of the
Measurement: label (the field next to the Measurement: label should specify All
Types, which allows all measurements to be viewed).
c) Verify that the vload waveform name appears in the Source Waveform(s) field. If
it does not appear, select it using the drop-down menu for that field. The
Measurement Tool should appear as shown in Figure 7.

Copyright Mentor Graphics Corporation 2005 35


SystemVision Basic Features

Figure 7 - Measurement Tool.

d) Leave all other fields unchanged, and click Apply. An overshoot measurement
should be performed on the vload waveform.
e) Click the Close button on the Measurement Tool. The Measurement Tool will be
used again in later labs.
6. Save the simulation results as a waveform database.
a) In the Waveform List, click the folder icon next to ex_rlc.1, which selects the
results of this simulation as a database.
b) Right-click to display the popup menu and click Save As... to display the Save As
dialog box.
c) Click Save to save the current database of simulation results in the specified
location. Now these simulation results can be loaded at any time without having
to run another simulation.
7. Close the database.
a) In the Waveform List, click the folder icon next to ex_rlc.1.
b) Right-click to display a popup menu.

Copyright Mentor Graphics Corporation 2005 36


SystemVision Basic Features

c) Click Close then Yes in the confirmation dialog box to close the display of
ex_rlc.1.

Frequency-domain Analysis
The frequency domain analysis is a small-signal AC analysis that uses the following
parameters for voltage source V_PULSE1:
ac_mag = 1.0
ac_phase = 0.0
1. Run the simulation for frequency domain analysis.
a) Return to the SystemVision window and choose the following to display the
Simulation Control dialog box: Simulation > Simulate.
b) In the Simulations tab, click the appropriate boxes to do the following:
Disable: Operating Point Analysis, Time-Domain Analysis
Enable: Frequency Analysis
c) Under Frequency Analysis, type the following values:
Freq Start: 10
Freq Stop: 100k
Number of Points: 10 (in the Setup tab)

Leave the settings on the other tabs as they are.


d) Click OK. This begins a frequency analysis on the active testbench. When the
simulation is complete, the waveform viewer updates the waveform list to display
the signals you can display for this analysis.
2. View results of the frequency analysis.
a) In the Waveform List, find ex_rlc.2 and double-click vload.
Figure 8 shows the resulting waveforms for magnitude (in dB) and phase (in
radians) vs. frequency (in Hz).

Copyright Mentor Graphics Corporation 2005 37


SystemVision Basic Features

Figure 8 - Results of Frequency-domain Analysis.

3. Perform Lowpass Measurement.


a) Select Tools > Measurement Tool from the menu.
b) Select Frequency from the drop-down menu in the field next to the
Measurement: label. By selecting Frequency as the measurement type for this
field, only measurements that pertain to frequency-domain analysis will appear in
the specific measurement field (on the far right).
c) Select Lowpass from the drop-down menu located in the specific measurement
field (located to the far right of the Measurement: label).
d) Select the db(vload) waveform from the Source Waveform(s) field drop-down
menu. The Measurement Tool should appear as shown in Figure 9.

Copyright Mentor Graphics Corporation 2005 38


SystemVision Basic Features

Figure 9 - Measurement Tool for Lowpass Measurement.

e) Leave all other fields unchanged, and click Apply. A lowpass bandwidth
measurement should be performed on the db(vload) waveform.
f) Click the Close button in the Measurement Tool.
4. Choose File > Exit to quit the Waveform Viewer.
a) If necessary, click Yes to the Confirm Exit dialog box.
b) Click No to the Unsaved Changes dialog box.
5. You have finished this exercise. Before exiting, select File > Close All to close all open
schematics.
Create and Simulate a New Design
In this lab exercise you will create a simple electrical design from analog models provided in
the SystemVision library, simulate, and view the results.
These exercises show you how to do the following tasks:
Create a new project
Create a new schematic using symbols and models from the Educational Library
supplied with SystemVision.
Place and wire symbols
Run a simulation and view results

Copyright Mentor Graphics Corporation 2005 39


SystemVision Basic Features

Create a New Project


1. If you do not have SystemVision running, invoke it as described in the previous lab
exercise.
2. Select the following from the menu bar: File > New...

This displays the New dialog box.


3. Click the Project tab.
4. In the Name field, type in a name for this project (such as my_project).
5. Click the Browse button next to the Location field. This displays the Choose
folder dialog box. Navigate to a directory where you want to store the files and data
for this project (the instructor will supply you with a suitable location). Click Select.
6. This returns to the New dialog box. Click OK.

A new project is created as shown in the ProjectNavigator Tree (you may need to
scroll right to see the project name).
Create a New Schematic
In this section of the exercise, you will create the schematic shown in Figure 10.

Figure 10 - New Circuit Schematic.

1. To create a new schematic for the circuit in Figure 10, choose: File > New...
a) In the New dialog box, click the File tab.
b) From the Types pane on the right, select Schematic.
c) In the Name field, type in a name for this schematic (such as rc_filter).
d) Click OK.

This displays a blank schematic in the work area.


Place Symbols

Copyright Mentor Graphics Corporation 2005 40


SystemVision Basic Features

1. Place a voltage source.


a) Choose the following from the menu bar: Add > Component...

This displays the Add Component dialog box.


b) Select Electrical from the list of directories on the left.
c) Choose v_pulse.1 from the list of components (symbols) for the Electrical
directory.
d) Click the Place button located below the graphical view of the symbol.
e) Move the cursor into the schematic. This displays a small symbol for a voltage
source in the schematic. Click to place the symbol.

For future symbols, this procedure will be summarized using notation similar to:
Electrical > v_pulse.1 > Place

2. Select and place the remaining symbols. As you did for the voltage source in the
previous step, select component symbols from the Add Component dialog box and
place them in the schematic window.
a) In the Add Component dialog box, select a resistor for placement.
Electrical > resistor > Place

b) Move the cursor into the schematic and click to place a resistor symbol (R1).
c) Move the cursor back to the Add Component dialog box and click Place.
d) Move the cursor into the schematic and click to place another resistor symbol
(R2).
e) In the Add Component dialog box, select a capacitor for placement.
Electrical > capacitor > Place
f) Move the cursor into the schematic and click. This places a capacitor symbol (C1)
in the schematic.
g) In the Add Component dialog box, select an electrical ground for placement.
Electrical > electrical_ref > Place

h) Move the cursor into the schematic and click.


i) Click Close in the Add Component dialog box.

Figure 11 shows what the display looks like with the added components (again,
the colors have been altered in SystemVision so that the schematics will be easily
viewable in printed form).

Copyright Mentor Graphics Corporation 2005 41


SystemVision Basic Features

Figure 11 - Initial Placement of Symbols.

3. Position the symbols.


a) Rotate C1 by right-clicking on the symbol to display a popup menu. Choose:
Transform > Rotate CCW

which rotates the capacitor symbol 90 counterclockwise.


b) Repeat this rotation action on the symbol for R2.
c) Select each symbol and move it into the positions shown in Figure 12.
d) Zoom in the schematic view to make it easier to view/connect the symbols.
Wire Symbols
1. After you have moved the symbols into position, you need to connect them.
a) From the menu bar, choose: Add > Net
b) Move the cursor to the left end of R1.
c) Click and drag the cursor from R1 to the top connection point of V_PULSE1. This
inserts a net between those two symbols, which should follow at a right angle as
you drag.
d) Release the left mouse button. This completes the net between R1 and V_PULSE1.
e) Repeat this action to connect the remaining symbols. Be sure to provide ample
spacing between components it makes wiring them together easier. Figure 12
shows how the completed design should look.

Copyright Mentor Graphics Corporation 2005 42


SystemVision Basic Features

Figure 12 - Completed Wiring.

2. To get out of the Add Net mode, click the Select icon
from the Object Toolbar.
3. Save the design. Choose File > Save.
Set Properties for Components
Now that the components have been placed and connected together to form the desired
circuit, the parameter values for each component should be specified.
1. Set the properties (parameter values) for voltage source V_PULSE1.
a) In the schematic work area, right-click on the voltage source (V_PULSE1). This
displays a popup menu.
b) Choose Edit Model Properties, which displays the Model Properties dialog box.
c) Click the Parameters tab. Note that the parameter names for this voltage source
are listed in the left-hand column under Name.
d) In the Value column, type the following values for each indicated parameter:
Name Type Default Value
WIDTH TIME 1 ms
PERIOD TIME 2 ms
PULSE VOLTAGE 5.0

WIDTH specifies a width of 1 ms for the output pulse.


PERIOD specifies a period of 2 ms for the entire pulse cycle
(i.e., 50% duty cycle).
PULSE specifies an amplitude of 5.0 V for the output pulse.
e) Click OK.
2. Set properties (parameter values) for resistors R1 and R2.

Copyright Mentor Graphics Corporation 2005 43


SystemVision Basic Features

a) Right-click on R1. Choose Edit Model Properties, which displays the Model
Properties dialog box.
b) In the Model Properties dialog box, click the Parameters tab.
c) Find the RES parameter in the Name column, move your cursor under the Value
column, and click in the blank space.
d) Type 5000 (or 5e3), which specifies 5 k as the resistance for R1.
Name Type Default Value
RES RESISTANCE 5000
e) Click OK.
f) Right-click on R2. Choose Edit Model Properties, which displays the Model
Properties dialog box.
g) In the Model Properties dialog box, click the Parameters tab.
h) Find the RES parameter in the Name column, move your cursor under the Value
column, and click in the blank space.
i) Type 50, which specifies 50 as the resistance for R2.
Name Type Default Value
RES RESISTANCE 50
j) Click OK.
3. Set properties (parameter values) for capacitor C1.
a) Right-click on C1. Choose Edit Model Properties, which displays the Model
Properties dialog box.
b) In the Model Properties dialog box, click the Parameters tab.
c) Find the CAP parameter in the Name column, move your cursor under the Value
column, and click in the blank space.
d) Type 1e-6, which specifies 1.0F as the capacitance for C1.
Name Type Default Value
CAP CAPACITANCE 1e-6
e) Click OK.
Set Properties for Nets
Now the components have been connected together and parameterized. The last step before
simulating is giving the nets meaningful names so they can be easily identified in the
Waveform Viewer.
1. Double-click on the net (wire) between V_PULSE1 and R1.
a) In the Properties dialog box, click the Name tab.
b) In the Label field, type vin (this will be automatically capitalized as you type it in).
c) Click OK.

Copyright Mentor Graphics Corporation 2005 44


SystemVision Basic Features

d) Double-click on any wire segment between R1 and C1.


e) In the Properties dialog box, click the Name tab.
f) In the Label field, type vout.
g) Click OK.
2. Save the schematic. Choose File > Save from the main menu.
This saves the schematic under the /sch directory in the Project directory you
specified when creating the project.
Simulate the Design
1. Under Design Roots [STD] in the Project Navigator Project tab, right-click on the
schematic you created, and select Simulate Design: <your_design_name> (e.g. rc_filter).
2. The Testbench Options dialog box will appear. Under Simulation Options, select
VHDL as the TopLevel File type.
3. Click OK.

The design will be netlisted, and the design models will be compiled (if necessary).
Then the Simulation Control dialog box should appear.
4. In the Simulations tab, make the following selections:
a) Enable: Operating Point Analysis and Time-Domain Analysis
b) Under Time-Domain Analysis, enter the following value:
End Time: 0.5
5. In the Results tab, select All Waveforms from the drop-down menu next to the
Time-domain Waveforms field.
6. To simulate, click OK in the Simulation Control dialog box.

This runs a simulation on the design. When the simulation completes, SystemVision
launches the waveform viewer.
View Results
1. In the Waveform List window, click on the [+] indicators next to c1, r1, and r2 to
expand the list of waveform names for each component.
2. Display the following waveforms by double-clicking (or by drag-and-drop into the
waveform display pane):
Under c1: i, v

Under r1: v

Under r2: v

Note that the horizontal display for each waveform is quite compressedto better view
each waveform, you need to change the range of the X axis.

You can change the range of the X axis either by clicking and dragging the mouse cursor
across the time values or by changing X axis properties, as described in the next step.

Copyright Mentor Graphics Corporation 2005 45


SystemVision Basic Features

3. Change X Axis Properties. Move the mouse cursor over the word Time(s) along the
X axis and right-click.
a) In the popup menu, choose Properties. This displays the X Axis Properties
dialog box.
b) Under Axis Range, disable (uncheck) Auto Range. Set Max to 0.005.
c) Click OK.
4. Figure 13 shows the four waveforms that should appear in the workspace.

Figure 13 - Pulse Behavior from Analog Source.

5. Take a moment to analyze any of the waveforms of interest.


6. Choose File > Exit to quit the waveform viewer.
a) If necessary, click Yes to the Confirm Exit dialog box.
b) Click No to the Unsaved Changes dialog box.
7. You have finished this exercise. Before exiting, select File > Close All to close all open
schematics.

Copyright Mentor Graphics Corporation 2005 46


SystemVision Basic Features

Lab Summary
This lab focused on some of the basic features of SystemVision. These features included DC
(Operating Point) analysis, as well as transient (time-domain) and AC (frequency-domain)
analyses.
The Waveform Viewer was also introduced, and basic instructions for viewing various
waveforms were given. Additionally, the Measurement Tool and the Waveform Calculator
were briefly introduced.

Lab Review

SystemVision Introduction and Basic Features 22

Copyright Mentor Graphics Corporation 2005 47


SystemVision Basic Features

Project Tab

Schematics

Symbol Libraries

Additional Files

SystemVision Introduction and Basic Features 23

Simulation Tab

Active TestBench (expanded)

VHDL Files:
Local Files
Library files
Generated Files

Spice .subckt and


Netlist Files
Experiment Files

Simulation Results
Use mouse cursor to view path info
Local compiled
(work) library

Additional
Pre-compiled VHDL Testbenches
model libraries

Spice model libraries

SystemVision Introduction and Basic Features 24

Copyright Mentor Graphics Corporation 2005 48


SystemVision Basic Features

SystemVision Introduction and Basic Features 25

Copyright Mentor Graphics Corporation 2005 49


SystemVision Basic Features

Glossary of Terms

The following terms apply to the way SystemVision handles design management.
Project a working collection of designs, schematics, test benches, experiments,
libraries, and associated files that SystemVision uses to manage data and user input.
You must use a project to operate on your design and save the results. Projects are
saved with the file extension .dproj.
Testbench a unique, operational design unit (schematic or HDL code) that consists
of a netlist of model instances and settings for simulation. Every simulation is
performed on a testbench. The design unit may or may not contain its own driving
stimulus and loads for simulation. (As an HDL term, testbench is the stimulus that
is affixed to the design for simulation purposes).
Experiment a unique collection of settings that you specify for a given simulation
and its results on a given design.
Design a user-defined network of models (usually represented by a schematic or
structural HDL code) that SystemVision can simulate.
Root (Design Root) a symbolic design associated with a specific testbench. Usually a
schematic, the root is the top design entity in a hierarchical design that is under test.
The root may or may not contain a driving stimulus that can produce results.
Typically, a testbench is attached to the design root.
File the basic element of data storage, which you can open, read, and write in
SystemVision but only if you have a project open. Although you cannot open a
project as a file, you can open files contained within a project.
Block a design that can be used as part of a larger design.
Functional block (fub) the ViewDraw term for a user-defined symbol. If you create
a fub, you must also associate it with a model and assign it to a library, if desired.
Database SystemVision uses the ViewDraw database structure to store project
information such as connectivity, symbol data, instance data. Simulation results are
stored as waveform database files (with extension .wdb), which is the format used by
the waveform viewer.
Schematic (page, sheet) the graphical display of symbols and connections that
represent a design. SystemVision saves a schematic as a file as part of a project.
Sheet the extension of a schematic (also referred to as a page). If you have large
schematic that does not fit into the document display area of SystemVision, you can
partition it into multiple sheets. Sheets do not necessarily create hierarchy for the
design (although you can create hierarchy on different sheets).
Library (database) a well-defined collection of files that contain symbol definitions
or model definitions (such as files containing VHDL-AMS models). A library is
maintained in a specific directory location defined by SystemVision.
Symbol the graphical representation of a model that gets displayed on a schematic.

Copyright Mentor Graphics Corporation 2005 50


SystemVision Basic Features

Component a specific instance of a model within a design, usually represented by a


symbol on a schematic. Typically, a component represents a one-to-one association
with the physical device being modeled, which means a component could be
displayed as multiple symbols on a schematic. For example, an op amp component
could consist of models of other discrete components, such as transistors and
resistors.
Part same as component.
Primitive the lowest level of a model, with no dependencies on other models for its
definition.
Property a characteristic of a symbol or model that takes a user-specified value.
Attribute a language-dependent characteristic of an element of that language (such as
a model or netlist) that takes a user-specified value.
Parameter a characteristic of a symbol or model that takes a user-specified value.
Design hierarchy an ordered listing of the components used in a given design.
Net the connection between two or more models.
Wire the graphical connection between two or more symbols on a schematic.
Node an intersection of nets.
Pin the connection point of a symbol for a component.

Copyright Mentor Graphics Corporation 2005 51


SystemVision Parametric Analyses

SystemVision Parametric Analyses

In this section, we will focus on the parametric analyses features of SystemVision. These
include deterministic-based Parameter Sweep and Sensitivity analyses, and statistical-based
Monte Carlo analysis. Also emphasized are the post-processing features of the Waveform
Viewer used to manage the large amounts of data that can result from such analyses.

SystemVision
Parametric Analyses

Copyright Mentor Graphics Corporation 2005 53


SystemVision Parametric Analyses

SystemVision Parametric Analyses

Parameter Sweeps
DC Sweeps
Time/Frequency-domain Sweeps
Sensitivity Analysis
Monte Carlo Analysis
Parameter distribution setup
Running Monte Carlo
Post-Processing Results

SystemVision Parametric Analyses 2

Parameter Sweeps

SystemVision Parametric Analyses 3

Copyright Mentor Graphics Corporation 2005 54


SystemVision Parametric Analyses

Transient Sweep Example

Time-domain results
as parameter is swept

SystemVision Parametric Analyses 4

DC Sweep Example

Example: Transistor IV curve


Sweep V1

Testbench circuit Ic vs Vc

SystemVision Parametric Analyses 5

Copyright Mentor Graphics Corporation 2005 55


SystemVision Parametric Analyses

Simulation Controls (cont.)


Multi-Run Tab Parameter Sweep

Edit
Parameters
Select
Sweep

Simulator Commands
Generated DC Sweep enable
(optional)

Select parameters

SystemVision Parametric Analyses 6

Sensitivity Analysis

SystemVision Parametric Analyses 7

Copyright Mentor Graphics Corporation 2005 56


SystemVision Parametric Analyses

What is Sensitivity Analysis?


An analysis technique used to determine the relative
sensitivity of performance measures to component
parameters.

SystemVision Parametric Analyses 8

Accessed via Multi-Run Tab

Select Analysis

How much to vary


component value

Which parameters
To vary

SystemVision Parametric Analyses 9

Copyright Mentor Graphics Corporation 2005 57


SystemVision Parametric Analyses

Sensitivity Waveforms to Measure

SystemVision Parametric Analyses 10

Sensitivity Bar Indicators

0.483
0.238

0.225

SystemVision Parametric Analyses 11

Copyright Mentor Graphics Corporation 2005 58


SystemVision Parametric Analyses

Sensitivity Calculation Example


for 10% Resistor Value Change

3.1023 (nominal)
2.9523 (R+10%)

Change in Measurement 0.15


Nominal Measurement 3.1023
0.483
Change in Component Value 0.3
Nominal Component Value 3.0

SystemVision Parametric Analyses 12

Monte Carlo Analysis

SystemVision Parametric Analyses 13

Copyright Mentor Graphics Corporation 2005 59


SystemVision Parametric Analyses

Monte Carlo Analysis

Statistical analysis
Performed by random selection of model
parameters
Nominal value, Tolerance and Distribution
assigned for each parameter
VHDL-AMS or SPICE parameters
Powerful post-processing in Waveform
Viewer
Transforms data into information

SystemVision Parametric Analyses 14

Monte Carlo Setup


Assigning Distributions
From schematic, select symbol then Edit Model Properties
Expand to input
Distribution Info

Nominal Value
(from Model
Properties)

Select Distribution

Assign Tolerance
Value (%)

Parameters without distributions


Have no effect on MC analysis

SystemVision Parametric Analyses 15

Copyright Mentor Graphics Corporation 2005 60


SystemVision Parametric Analyses

Running Monte Carlo


Select Multi-run tab in Simulation Control dialog

Select
Monte Carlo Input # of Runs

Optional Seed
(default = 1)
Selects only
Extreme values
during simulation

SystemVision Parametric Analyses 16

Viewing Monte Carlo Results

Right Click
To access
Parameter
Parameter Table
Values Saved
in WDB

Plot as a
Plot Group of
Individual Signals
Runs

Icons indicate
Compound
Waveforms

SystemVision Parametric Analyses 17

Copyright Mentor Graphics Corporation 2005 61


SystemVision Parametric Analyses

Post-Processing Monte Carlo Results


Measurement Example: Risetime
Select
Measurement
Tool

Select
Measurement

Input
Compound
Waveform

Create new
waveform

SystemVision Parametric Analyses 18

Post-Processing Monte Carlo Results


Measurement Example: Risetime (cont.)

Measured Measurement
Value Creates
Scatterplot

Y-axis
Indicates
Measurement Run
Number

SystemVision Parametric Analyses 19

Copyright Mentor Graphics Corporation 2005 62


SystemVision Parametric Analyses

Waveform Calculator

Equation Stack

Input Waveform
Advanced Functions
(more in View menu)

Standard
Functions Plot to Active Graph

Enter to Stack

SystemVision Parametric Analyses 20

Post-Processing Monte Carlo Results


Calculator Example: Histograms

Winding Motor
Resistance Inductance

Plot MC
Parameter
Values

Transform to
Histogram Transform to
Result: Normal Histogram
Distribution Result: Uniform
Distribution

SystemVision Parametric Analyses 21

Copyright Mentor Graphics Corporation 2005 63


SystemVision Parametric Analyses

Post-Processing Monte Carlo Results


Calculator Example: Correlation plots

Risetime
Histogram
Motor Position
(original MC data)

Risetime vs r_wind
(high correlation)

Risetime vs inductance
(low correlation)

SystemVision Parametric Analyses 22

Lab Exercise

SystemVision Parametric Analyses 23

Copyright Mentor Graphics Corporation 2005 64


SystemVision Parametric Analyses

Lab Parametric Analyses


In this lab, you will use SystemVision to perform various
parametric analyses on an h-bridge design.
Motor Current and Position

VHDL Digital
Command SPICE circuit
Inputs

VHDL-AMS Motor
with Mechanical
Load Dynamics

SystemVision Parametric Analyses 24

SystemVision Parametric Analyses 25

Copyright Mentor Graphics Corporation 2005 65


SystemVision Parametric Analyses

Lab Perform Parametric Analyses

In this lab we will use Parameter Sweeps, Sensitivity and Monte Carlo analyses in
SystemVision to analyze the performance of a simple H-Bridge Motor Controller. This
example combines SPICE models for the electronics with VHDL-AMS models for the
motor and loads. The ability to simulate these together is made possible by SystemVisions
support for multiple industry standard languages. Combining this with Parametric Analyses
makes SystemVision a powerful tool for robust mixed-technology system design.
The SystemVision project is named Beyond_SPICE. Contained in the project are several test
benches that illustrate how SystemVision uses VHDL-AMS to extend SPICE beyond its
inherent limitations for modeling mixed-technology systems.
H-bridge Motor Controller
The design tb_hbridge_spice_ams, shown in Figure 1, is an H-bridge circuit combining SPICE
level transistors with digital (VHDL) stimulus and a VHDL-AMS DC motor model with
loads attached. Using SystemVision, the power of VHDL-AMS can be seamlessly integrated
with existing SPICE models or subcircuits, to provide a multi-language, mixed-technology
system simulation.

DC Motor
Rotational
Stop

Digital Command
Inputs

Moment of
Inertia

Figure 1 - tb_hbridge_spice_ams schematic.

Design Selection/Exploration

Copyright Mentor Graphics Corporation 2005 66


SystemVision Parametric Analyses

1. Load the Beyond_Spice project into SystemVision.


a) Select File > Open > Project and navigate to the Parametric_Analyses/Beyond_Spice
directory indicated by the instructor.
b) Double-click on the Beyond_Spice.dproj file.
2. From the Project tab, click on Design Roots > tb_hbridge_spice_ams to open the
schematic.
3. Explore some of the component models. For example, select the DC Motor Symbol
and RMB > Push Language > VHDL to view the VHDL-AMS model (repeat for other
VHDL-AMS models as desired).
4. View some of the model properties that have been assigned to various symbols:
RMB > Edit Model Properties gives you access to the VHDL-AMS model properties.
Double-click on a SPICE model to access the SPICE attributes.
Simulating the Circuit (Nominal Simulation)
First we will perform a nominal simulation to verify that the circuit is operating as intended.
1. Return to the schematic and from the menu, select Simulation > Simulate to invoke the
Simulation Control window (there is also a simulation icon available on the icon bar).
If necessary, make tb_hbridge_spice_ams the active testbench.
2. The Simulations tab is for the basic settings and to enable/disable the desired
analyses. Enable the Time-Domain Analysis and set End Time to 1 sec.
The Results tab allows you to select the signals for viewing. The default selection
for this design is Selected Waveforms, with which individual waveforms have
been selected for analysis.
3. The Multi-Run tab is for performing variations on component parameters. Click on
this tab, and select Nominal for the Parameter Change Type, if necessary.
The Advanced tab is used for advanced simulation settings (normally not
required).
4. Click the OK button to run the simulation.
Viewing Results
The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages). Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the desired
signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the digital command signals fcmd and rcmd
indicated by the symbol next to the waveform name (Note: the #defhook#0
extension to the signal name is inserted by the netlister when connecting analog pins
to digital pins).
2. Next plot the motor current ydcmotor1/i. Notice the effect of the back-emf voltage as
modeled in the motor equations.

Copyright Mentor Graphics Corporation 2005 67


SystemVision Parametric Analyses

3. Plot the signal position. This is the position of the motor shaft over time. Notice that
the motor does not return to its original position due to the short length of the
reverse command signal.
4. Verify that the waveforms match those shown in Figure 2.
5. Close the graph window, or bring up a new one by selecting File > New.

Figure 2 - Nominal Simulation Results.

Parameter Sweeps

Parameter Sweeps are useful for automatically varying specific circuit parameters and
running simulations.
Setup Sweeps
We next examine the effects of the component parameters on the motor position. We will
do this by sweeping a parameter (motor winding resistance) over a specified range.
1. Return to the tb_hbridge_spice_ams schematic and from the menu, select Simulation >
Simulate to invoke the Simulation Control window

2. Select the Multi-Run tab as shown below:

Copyright Mentor Graphics Corporation 2005 68


SystemVision Parametric Analyses

Figure 3 - Multi-Run Tab with Sweep Values.

3. Change the Parameter Change Type to Sweep Values.


4. Click on the Parameter Edit button to invoke the Sweep Parameter dialog:

Figure 4 - Sweep parameter dialog box.

5. Click on the browse button () to invoke the Select Parameter dialog.


6. Select ydcmotor1.r_wind and click OK.
7. Set the Sweep Type to List and the Sweep List to 50.0 100.0 200.0.
8. Click OK in the Sweep Parameter dialog.
9. Click OK in the Simulation Control dialog.

Copyright Mentor Graphics Corporation 2005 69


SystemVision Parametric Analyses

10. When the simulation runs are complete, plot the digital command signals (fcmd and
rcmd) along with the motor position as shown in Figure 5 below:

Figure 5 - Parameter Sweep Results.

Performing Measurements (optional)


As expected, these results show that the winding resistance has a significant effect on the
final angular position. SystemVision allows you to quantify relationships between system
performance and component parameters by performing measurements on the simulation
results. In this section we will re-run the previous analysis with additional sweep values. This
will take a bit longer to run, but the extra data generated will allow us to create meaningful
correlation plots.
1. Re-invoke the Simulation Control dialog and click on the Multi-Run tab.
2. Click the Parameter Edit button and modify the existing fields as follows:
Parameter: E(ydcmotor1,r_wind) (unchanged from previous analysis)
Sweep Type: Increment
Sweep Start: 10.0
Sweep Stop: 100.0
Sweep Increment: 10.0
3. Click OK in the Sweep Parameter dialog.
4. Click OK in the Simulation Control dialog.
5. When the simulation runs complete, plot the position waveform into a new graph
(select File > New to create a new graph window).

Copyright Mentor Graphics Corporation 2005 70


SystemVision Parametric Analyses

6. Click the Add Cursor button twice to place two cursors (C1 and C2) at locations
similar to those shown in Figure 6.

Figure 6 - Parameter Sweep Results with Measurements.

7. Click the Measurement Tool icon and fill in the dialog as shown in Figure 7 to
annotate the Risetime measurement results to the graph.

Copyright Mentor Graphics Corporation 2005 71


SystemVision Parametric Analyses

Figure 7 - Measurement Tool for Risetime Measurement.

8. Click Apply. The measurements are annotated to the graph.

The measurement can be moved from one waveform to another by clicking on the
handle at either the top of bottom of the result markers, and holding and dragging
to another waveform. All measurement results can be viewed by right-clicking with
the cursor over the measurement and selecting Measurement Results.
9. In the Measurement Tool, select the Plot New Waveform option and re-apply to
create a plot of Risetime vs. motor winding resistance.
10. Bring back up the graph window with the waveforms shown in Figure 6.
11. Reposition the cursors so that they enclose the falling edges of the swept waveforms.
12. In the Measurement Tool, select Falltime as the Measurement.
13. Re-apply to create a plot of Falltime vs. motor winding resistance.
14. The results are shown in Figure 8.
The waveforms were super-imposed by copying and pasting (or dragging) a
waveform from one graph window to another graph window.
The individual measurement points can be displayed by selecting the waveform
name (in the signal pane) and selecting RMB > Data Point > Symbols.

Copyright Mentor Graphics Corporation 2005 72


SystemVision Parametric Analyses

Figure 8 - Correlation Plots.

Figure 8 clearly shows the effect the value the motor winding resistance has on the shaft
position when used with the H-bridge driver circuit. This is a simple example of how
SystemVision can be used to turn simulation data into engineering information that can be
used to help improve a system design.
15. Exit out of the Waveform Viewer. Do not save the waveforms.
Sensitivity Analysis
Sensitivity analysis is used to automatically vary each component parameter (or selected
parameters) in a design to a user-specified percentage of nominal value. This occurs one
parameter at a time, so that the sensitivity of a design performance measure to the various
parameters can be determined.
Run Sensitivity Analysis
Like Parameter Sweeps, Sensitivity analysis is run in combination with one of the main
analysis types (Time or Freq domain) and the controls are built into the Multi-Run tab of the
Simulation Control dialog.
1. From the menu, select Simulation > Simulate to invoke the Simulation Control window.
2. Select the Multi-Run tab as shown in Figure 9.

Copyright Mentor Graphics Corporation 2005 73


SystemVision Parametric Analyses

Figure 9 - Simulation Control - Multi-Run Tab for Sensitivity.

3. Select Sensitivity as the Parameter Change Type.


4. Set the Sensitivity Tolerance percentage to 10.
5. From the dropdown menu under the Tolerance (%) label, select Use Selected
Parameters.
6. Click on () next to the Use Selected Parameters field.

Sensitivity analysis can be performed automatically on all parameters in a design.


This is useful to gain an overview of potential problem areas. However, it will reduce
the number of simulations required to select various parameters manually.
7. Verify that the following parameters are selected:
ydcmotor1,d
ydcmotor1,j
ydcmotor1,l
ydcmotor1,kt
ydcmotor1,r_wind
yinertia_r3,j

8. Click on the Simulations tab to verify that Time-Domain Analysis is selected with
settings as shown in Figure 10.

Copyright Mentor Graphics Corporation 2005 74


SystemVision Parametric Analyses

Figure 10 - Simulation Control Simulations Tab.

9. Click OK to run the Sensitivity analysis.


View Sensitivity Results
1. When the analysis is complete, view the multi-member position waveforms, as shown
in Figure 11.

The position waveforms show how sensitive the motor angle position is to variations
in each component parameter included in the analysis. More meaningful would be to
perform a measurement on these waveforms, and plot the relative sensitivity of this
performance measure to each parameter that was varied.

Copyright Mentor Graphics Corporation 2005 75


SystemVision Parametric Analyses

Figure 11 - Multi-member position waveforms.

2. Open the Measurement Tool.


3. Select Maximum as the Measurement type.
4. A new "Plot Sensitivity of "option appears on the Measurement Tool under
Measurement Results. Select this option.
5. Click Apply (and OK to open new window). The sensitivity results should be
displayed as shown in Figure 12.

These waveforms illustrate that the maximum value of the position angle is most
sensitive to the damping coefficient of the motor. The next most sensitive parameter
is the winding resistance of the motor.
6. Close the Waveform Viewer. Do not save the changes.

Copyright Mentor Graphics Corporation 2005 76


SystemVision Parametric Analyses

Figure 12 - Sensitivity results chart.

Monte Carlo Analysis


Monte Carlo (MC) analysis is a statistical analysis method that randomly varies model
parameters within a specified tolerance range and distribution. MC analysis is often used to
help determine the manufacturability of a design, that is, given the tolerances used, how
robust the design is when manufactured in large quantities. Using SystemVisions powerful
post processing capabilities, it is also possible to perform correlation studies and determine
sensitivities of performance criteria to device parameters. Armed with this information, the
engineer can make informed decision for system optimization (i.e. cost vs. performance).
The ability to do this for systems containing a mix of technologies with a combination of
SPICE and VHDL-AMS models makes SystemVision a very powerful tool for virtual
mixed-technology system integration.
In this section you will setup parameters, run a Monte Carlo Analysis and perform
correlation studies of various device parameters to system performance.
Monte Carlo Parameter Setup:
1. Return to the tb_hbridge_spice_ams schematic, select the DC_Motor symbol.
2. Right-click and select and Edit Model Properties to bring up the dialog box:
3. If the values for parameters R_WIND and L are numeric (100.0 and 1.0e-3), then
perform the following two steps. If they already have distributions specified, then the
following two steps may be skipped.

Copyright Mentor Graphics Corporation 2005 77


SystemVision Parametric Analyses

Figure 13 - Parameters tab.

4. Select the Parameters tab and click on the browse button to first R_WIND, and
then L to enter in the following tolerance and distribution information:
R_WIND:
Nominal Value = 100.0
Distribution = Normal
Tolerance = 20
L:
Nominal = 1.0e-3
Distribution = Uniform
Tolerance = 20
5. Click OK to close the Model Properties dialog.
Running Monte Carlo
Once the parameters have been assigned, the next step is to run the analysis. Like Parameter
Sweeps and Sensitivity analysis, the Monte Carlo analysis is run in combination with one of
the main analysis types (Time or Freq domain) and the controls are built into the Multi-Run
tab of the Simulation Control dialog.
1. From the menu, select Simulation > Simulate to invoke the Simulation Control window.
2. Select the Multi-Run tab as shown in Figure 14.

Copyright Mentor Graphics Corporation 2005 78


SystemVision Parametric Analyses

Figure 14 - Simulation Control - Multi-Run Tab.

3. Change the Parameter Change Type to Monte Carlo.


4. Set the Number of Runs to 10.
5. Click on the Simulations tab to verify that Time-Domain Analysis is selected with
settings as shown in Figure 15.

Figure 15 - Simulation Control Simulations Tab.

6. Click OK to run the simulation. This will take a few minutes. You can monitor the
progress by observing the lower left-hand corner of the SystemVision interface
shown in Figure 16.

Copyright Mentor Graphics Corporation 2005 79


SystemVision Parametric Analyses

Simulation progress Monitor

Figure 16 Progress Monitor.

Post-processing the Monte Carlo Results


When running a Monte Carlo analysis, the simulator does great job of generating lots of
data. SystemVision has some powerful post-processing capabilities that allow the engineer
to turn this raw data in to design information. This section will explore some of these
capabilities and features.
Plotting Results
When the simulation is complete, the resulting database file will be automatically loaded into
SystemVision.
1. Plot the digital input signals (fcmd#defhook#0 and rcmd#defhook#0) along with the
armature angle (position) and motor current (ydcmotor1/i) as shown in Figure 17.

Copyright Mentor Graphics Corporation 2005 80


SystemVision Parametric Analyses

Figure 17 Monte Carlo Results before Post-Processing.

2. Notice that the motor position and current both exhibit some variation and are
displayed as compound waveforms. Each member of the family of curves represents
one of the Monte Carlo simulation runs. Next we quantify these variations by post-
processing the simulation data using the Measurement Tool and Waveform
Calculator.
3. Select Tools > Measurement Tool to begin performing measurements.
4. Select the position waveform using the dropdown menu from the Source
Waveform(s) field.
5. Select Maximum as the Measurement type.
6. In the Measurement Results field, select Annotate Waveform(s) with Result Markers.
7. Select Apply Measurement to: Entire Waveform.
8. Click Apply to annotate to the waveform as shown in Figure 18.

Copyright Mentor Graphics Corporation 2005 81


SystemVision Parametric Analyses

Figure 18 - Position Waveform with Maximum Measurement Applied.

9. The measurement is actually performed on all the members of a compound


waveform, but only one result is displayed at a time. To display the other results,
right-click on the measurement marker and select Measurement Results... This will
bring up a form allowing you to enable/disable the measurement results for each
member.
10. Measurement results on compound waveforms can also be displayed in the form of a
scatter plot (results vs. run number). To do this, invoke the Measurement Tool again,
and with position as the Source Waveform, select Plot New Waveform as shown
in Figure 19.

Copyright Mentor Graphics Corporation 2005 82


SystemVision Parametric Analyses

Select Plot New


Waveform

Figure 19 - Measurement Tool Configured to Plot a New Waveform.

11. Click Apply to create new waveform as shown in Figure 20. Scatter plots are useful
in spotting trends and can be also used to create correlation plots (we will do this a
bit later).
12. Close the Measurement Tool.

Copyright Mentor Graphics Corporation 2005 83


SystemVision Parametric Analyses

Figure 20 - Scatter Plot of Maximum Position versus MC Run.

Using the Calculator


SystemVision also comes with a powerful Waveform Calculator. In addition to the standard
arithmetic, algebraic and trigonometric operators, you will find some powerful statistical and
transform functions. Here we will continue post-processing our Monte Carlo results to
provide more useful information about our design.
Tip: In this section we will be generating quite a few graphs. To help manage the windows, you may want to
take advantage of the multiple workspace feature of the Waveform Viewer. Workspaces appear as tabs along
the bottom of the Waveform Viewer and can be created using the right-click menu.
1. Select Tools > Waveform Calculator to invoke the Waveform Calculator.
2. Select View > Additional Functions > Statistics from the menu as shown in Figure 21.

Figure 21 - Waveform Calculator.

3. Select the Maximum measurement result scatter plot waveform, Maximum(position),


and click the hstgrm button. The Histogram Function dialog is shown in Figure 22.

Copyright Mentor Graphics Corporation 2005 84


SystemVision Parametric Analyses

Figure 22 - Histogram Function Window.

4. Set the number of bins to 10 and click OK.


5. Hit Enter in the calculator to put the histogram in the stack, as shown in Figure 23.

Figure 23 - Calculator with Histogram Data in Stack.

6. In the waveform viewer, select File > New to create a new graph window then click
Plot in the calculator to plot the histogram as in Figure 24.

Copyright Mentor Graphics Corporation 2005 85


SystemVision Parametric Analyses

Figure 24 - Histogram of Maximum Angle versus Run.

Since there are only 10 runs, this histogram is not particularly meaningful, but as the number
of runs increases, this can be a very useful way of viewing the statistical data.
Creating Correlation Plots
Here we will combine the power of the Measurement Tool and Waveform Calculator to determine
correlation between system performance and device parameters using the data generated
from Monte Carlo analysis.
1. Plot the signals Maximum.position, L and r_wind into a new graph as shown in Figure 25.
L and r_wind are parameters, and are available in the MonteCarlo Parameters > ydcmotor1
folder.

Copyright Mentor Graphics Corporation 2005 86


SystemVision Parametric Analyses

Figure 25 - Various Data versus Run Index.

2. From the Calculator menu select View > Additional Functions > Transforms.
3. Click on the YvsX button and enter r_wind into the wfX field and Maximum.position into
the wfY field as shown in Figure 26.

Figure 26 - Calculator YvsX Transform Dialog.

Hint: Use the down arrow field or select the waveform label and click the button to enter waveforms.
4. Click OK.
5. In the Calculator click Enter to put this calculation into the stack and then click Plot
to plot it into a new graph as shown in Figure 27. (Open a new graph window if

Copyright Mentor Graphics Corporation 2005 87


SystemVision Parametric Analyses

necessary).

Figure 27 - Angle as a Function of Winding Resistance.

6. Repeat steps 3 thru 5 above to plot Maximum.position vs. L (motor inductance).


7. Note the high correlation for motor winding resistance and low correlation with
motor winding inductance.

These findings are consistent with those from the Sensitivity analysis: maximum
motor angle depends strongly on motor winding resistance, but not much on motor
winding inductance.

The advantage of Monte Carlo analysis over Sensitivity analysis is that Monte Carlo
analysis varies all of the component values (randomly within their tolerances) for
each simulation run. Sensitivity analysis only varies one component at a time. This
means that tolerance stack-up issues can be detected using Monte Carlo analysis, but
not by Sensitivity analysis.
Further Design Exploration (Optional)
If time permits, create additional correlation plots for the following:
1. Risetime(position) vs. r_wind.
2. Risetime(position) vs. L..
3. Maximum motor speed vs. r_wind.

Copyright Mentor Graphics Corporation 2005 88


SystemVision Parametric Analyses

4. Maximum motor speed vs. L..


5. When finished, close the Waveform Viewer and SystemVision.
Lab Summary
This lab focused on the Parametric Analyses features of SystemVision. These features
include Parameter Sweeps (deterministic), Sensitivity analysis (deterministic), Monte Carlo
analysis (statistical), and useful post-processing techniques using the Measurement Tool and
Waveform Calculator.
All lab exercises were performed on a mixed-technology (multi-physics), multi-language
(VHDL-AMS and SPICE) design. The ability to seamlessly integrate both types of models
into a single design allows designers to take full advantage of the power and flexibility of
VHDL-AMS, and the large amount of available SPICE models.

Copyright Mentor Graphics Corporation 2005 89


SystemVision Symbols and Models

SystemVision Symbols and Models

In this section, we will highlight the models that are available with SystemVision. We will
also focus on some of the basic methods for creating symbols for models, as well as creating
models themselves.

SystemVision
Symbols and Models

Copyright Mentor Graphics Corporation 2005 91


SystemVision Symbols and Models

SystemVision Symbols and Models

VHDL-AMS Models
SPICE Models
Combining VHDL-AMS and SPICE Models
Symbol Generation
Modeling Tools

SystemVision Symbols and Models 2

VHDL-AMS and SPICE Models

SystemVision Symbols and Models 3

Copyright Mentor Graphics Corporation 2005 92


SystemVision Symbols and Models

VHDL-AMS Models

Working with VHDL-AMS Models

Accessing
Viewing/Editing
Importing

SystemVision Symbols and Models 4

SystemVision VHDL-AMS Models


EduLib Models VDA Models
Educational oriented Automotive oriented
Covers multiple technologies Covers multiple technologies

SystemVision Symbols and Models 5

Copyright Mentor Graphics Corporation 2005 93


SystemVision Symbols and Models

Viewing VHDL-AMS Models

Open from
Simulation
Tab

or Push
into Symbol

SystemVision Symbols and Models 6

View/Edit VHDL-AMS Models

Keyword
Sensitive
Text Editor

SystemVision Symbols and Models 7

Copyright Mentor Graphics Corporation 2005 94


SystemVision Symbols and Models

Importing VHDL-AMS Models

Use Add File method from Simulation Tab


Select Model
File

RMB on
VHDL Files
Folder

SystemVision Symbols and Models 8

SPICE Models

Working with SPICE Models

Accessing
Viewing/Editing
Importing

SystemVision Symbols and Models 9

Copyright Mentor Graphics Corporation 2005 95


SystemVision Symbols and Models

SystemVision SPICE Models


SPICE Component Library
Accessed directly from SPICE libraries
Accessed from DxDatabook

SPICE Models
Primitive
Semiconductor
Macromodel

SystemVision Symbols and Models 10

Viewing SPICE Subcircuits

Open from
Simulation
Tab or Push
into Symbol

SystemVision Symbols and Models 11

Copyright Mentor Graphics Corporation 2005 96


SystemVision Symbols and Models

View/Edit SPICE Subcircuits

Standard
SPICE
Syntax

SystemVision Symbols and Models 12

Using SPICE Primitives


Will generate a SPICE-on-Top
netlist automatically

SPICE
Model
Name

SPICE Double-click
Symbol On Symbol to
Libraries Place on Access
Schematic Properties

SystemVision Symbols and Models 13

Copyright Mentor Graphics Corporation 2005 97


SystemVision Symbols and Models

Using SPICE Libraries

Drag and Drop


to place on
Schematic

Model Property
Automatically
Populated

SystemVision Symbols and Models 14

Viewing SPICE Libraries

Double-Click
to view
model

SystemVision Symbols and Models 15

Copyright Mentor Graphics Corporation 2005 98


SystemVision Symbols and Models

SPICE Component Library

SystemVision includes large database


(>18,000) of SPICE symbol and model
libraries
Accessible using DxDatabook
Provides grouping, filtering and search
mechanisms
Can merge with existing corporate database
within DxDatabook

SystemVision Symbols and Models 16

Accessing Spice Component Libraries


Using DxDatabook

Click to
Enable
DxDatabook

Filter Auto-Populates
Select
Database Component
Library
Properties

Select
Component

Drag Symbol
To Place on
Schematic

SystemVision Symbols and Models 17

Copyright Mentor Graphics Corporation 2005 99


SystemVision Symbols and Models

Importing SPICE Libraries


Manage
Libraries in
Simulation Tab

RMB or
Drag and Drop
to add .lib files

Expand to view
Individual
models

SystemVision Symbols and Models 18

Combining SPICE and VHDL-AMS Models


Symbol Library
includes both
SPICE and VHDL-AMS

SPICE
Components
Symbols
VHDL-AMS
Symbols
Loads

VHDL-AMS
VHDL
Digital
Symbols
Inputs

SystemVision Symbols and Models 19

Copyright Mentor Graphics Corporation 2005 100


SystemVision Symbols and Models

Combining SPICE and VHDL-AMS Models


SPICE-on-Top Netlist

Standard
SPICE Netlist
Entries
Go to active
Testbench

Expand to View
Top-Level
Netlist file

Y Elements
Call VHDL-AMS
Models

SystemVision Symbols and Models 20

Symbol Generation

SystemVision Symbols and Models 21

Copyright Mentor Graphics Corporation 2005 101


SystemVision Symbols and Models

Symbol Generation

Drag-n-Drop
VHDL-AMS/SPICE (text-based)

Symbol Wizard
VHDL-AMS/SPICE (Schematic-based)
VHDL-AMS/SPICE (text-based)

SystemVision Symbols and Models 22

Symbol Wizard
Select Model:
- Schematic
- VHDL-AMS
- SPICE

For Schematics,
Select Pins from
Available Net
Names
Instantiate New
Model in Design

SystemVision Symbols and Models 23

Copyright Mentor Graphics Corporation 2005 102


SystemVision Symbols and Models

Modeling Tools

SystemVision Symbols and Models 24

SystemVision Model Development

Modeling Tools

PSPICE Conversion Utility


Makes PSPICE models compatible with SystemVision
SPICE format
Access Tools menu
VHDL-AMS Model Wizard
Auto-generation of VHDL-AMS model using forms
Code Preview Window (watch model being built)
Automatic TLU-based modeling

SystemVision Symbols and Models 25

Copyright Mentor Graphics Corporation 2005 103


SystemVision Symbols and Models

PSPICE Conversion
Select under Select PSpice Lib,
Tools Menu Generate SV
Spice Lib

SystemVision Symbols and Models 26

VHDL-AMS Model Wizard

GUI-driven VHDL-AMS modeling tool

Minimal language syntax knowledge needed


Supports all standard IEEE types
Symbol created automatically
Access from Tools > Create VHDL Model
Support for PWL functions

SystemVision Symbols and Models 27

Copyright Mentor Graphics Corporation 2005 104


SystemVision Symbols and Models

Accessing VHDL Model Wizard

1. Select Tools > Generate VHDL Model


(or use button)
2. Select New
3. Enter model name

SystemVision Symbols and Models 28

VHDL Model Wizard GUI

Preview the model as it is being constructed

SystemVision Symbols and Models 29

Copyright Mentor Graphics Corporation 2005 105


SystemVision Symbols and Models

PWL Model Developed with Model Wizard

SystemVision Symbols and Models 30

Built-in Curve-Fitting Option

Original Data
Composed of
Linear Segments

Cubic-Spline
Curve Fit

SystemVision Symbols and Models 31

Copyright Mentor Graphics Corporation 2005 106


SystemVision Symbols and Models

Lab Exercise

SystemVision Symbols and Models 32

Lab Symbols and Models


In this lab, you will use SystemVision to create
various symbols and models for an Unmanned Aerial
Vehicle (UAV) Propeller system.

SystemVision Symbols and Models 33

Copyright Mentor Graphics Corporation 2005 107


SystemVision Symbols and Models

SystemVision Symbols and Models 35

Copyright Mentor Graphics Corporation 2005 108


SystemVision Symbols and Models

Lab Creating Symbols and Models

SystemVision provides useful tools and capabilities for symbol and model creation. This
section of the workshop introduces many of these features. As you use this information, feel
free to experiment with product features and functions not explicitly covered.
This portion of the lab covers the following tasks:
Drag and Drop a VHDL-AMS model to automatically create a new symbol
Use the Symbol Wizard to create a new symbol from a schematic
Simulate and compare results of both VHDL-AMS and schematic-based models
Generate PWM Symbols for UAV Propeller System
This exercise illustrates two approaches for creating symbols for existing models.
Open the UAV_Prop Design
1. Select one of the following methods and invoke SystemVision.

When you install SystemVision, the installation program creates two ways with which
it may be invoked:
Windows Start Menu.

Start > All Programs > Mentor Graphics SystemVision > SystemVision Professional 4.2

The desktop icon.

Double-click on the SystemVision icon.


2. Close the Hint dialog (if necessary).
3. Select File > Open > Project and browse to the Symbols_Models/UAV_Prop folder (the
instructor will provide the location of this folder).
4. Double-click on the uav_prop.dproj file.

The uav_prop project should now be open.


5. Expand the project hierarchy.
a) At the top of the Project Navigator (Tree pane), click the Simulation tab. Note
the [+] indicator to the left of the TestBenches and Model Libraries for this
project.
b) Click the [+] next to TestBenches. The testbench listing is expanded and the
contents of the testbench are displayed.
6. Open the schematic for this design.
a) Under TestBenches, double-click airplane_prop [ACTIVE], which displays the
schematic for this system. An incomplete schematic should appear as shown in
Figure 1.

Copyright Mentor Graphics Corporation 2005 109


SystemVision Symbols and Models

Figure 1 Initial airplane_prop system.

b) (Optional) Click the zoom icons in the View Toolbar to adjust the size of the
display.
System Operation
The purpose of the airplane_prop system is to control the power delivered to a propeller used
by a UAV (Unmanned Aerial Vehicle). The system works as follows:
Power from a 42V battery pack (modeled as a DC voltage source) is delivered to a DC
motor through a digitally-controlled switch. The switch is controlled by a PWM (pulse-width
modulator) running at 2.5 KHz. When the switch is on, current flows from the 42V supply
into the motor winding. When the switch is off, the free wheeling diode (D1) allows for the
continuous flow of current as required by the motor winding inductance.
For further information about this system, please refer to UAV Case Study #5 (RC Airplane
System), available on the SystemVision web site.
Add PWM Model File to Project
The design given in Figure 1 does not include the actual PWM component required to drive
the switch. The following steps show how to add a new PWM component model to the
airplane_prop system.

1. You will first need to locate the PWM model so it can be added to the project. In the
Simulation tab, expand the airplane_prop folder.
2. Expand the Files folder. This will reveal several simulation file categories.
3. Expand the VHDL Files folder. This will show all of the VHDL-AMS models that
are already included for use in this design.
4. Right-click on the VHDL Files folder, and select Add VHDL File
5. Navigate to the hdl directory where the required file, pwm_vhdl.vhd, has been placed.
6. Select the file and click Open (or double-click on the file). The new model file should
now appear under the VHDL Files folder.
Generate and Add VHDL-AMS PWM Symbol to Schematic

Copyright Mentor Graphics Corporation 2005 110


SystemVision Symbols and Models

The following steps show how to take an existing VHDL-AMS model (with no symbol), and
automatically create a symbol that can be instantiated in the airplane_prop schematic.
1. To automatically create a symbol for the new PWM model, expand the pwm_vhdl.vhd
hierarchy.
2. Select and drag, the model's entity, pwm_vhdl, onto the schematic canvas (the model's
entity is typically given the same name as the model file).
3. As the entity is dragged onto the canvas, it is transformed into a symbol. Place the
symbol on the schematic, between the two open nets at the top of the design. The
schematic should look like that shown in Figure 2.

Figure 2 - Complete schematic with VHDL-AMS PWM symbol.

4. Double-click on the newly-added symbol, and type in a label for it, such as PWM1.
This will allow you to easily identify the PWM waveforms in the Waveform Viewer.
5. RMB > Push Language > VHDL on the new symbol to view the pwm_vhdl model listing.
6. When you finish reviewing the model, select File > Close from the menu to close the
listing.
Simulate with Time-domain Analysis and View Results
1. Specify the simulation settings.
a) Choose Simulation > Simulate from the menu bar. This displays the Simulation
Control dialog box. This dialog box provides four tabs: Simulations, Results,
Multi-Run, and Advanced. When you click on a different tab, the dialog box
changes to provide different simulation settings.

Note: Schematic netlisting and model compiling are automatically performed


when you run the Simulate command. Alternatively, you can run Netlist or
Compile commands manually if desired.
b) In the Simulations tab:
i) Enable Time-Domain Analysis by clicking in its check box.

Copyright Mentor Graphics Corporation 2005 111


SystemVision Symbols and Models

ii) Under Time-Domain Analysis, type the following value:

End Time: 1 sec (or 1)


2. Specify results settings.
a) Click the Results tab.
b) Select All Waveforms from the Time-domain Waveforms menu.
3. Run the simulation for time domain analysis.
a) Click OK. This begins the simulation on the active testbench (airplane_prop)
shown in the Project Navigator. The simulation should take a minute or so.
b) When the simulation is complete, SystemVision launches the Waveform Viewer
in a separate window.
4. View results of the time domain analysis.
a) In the Waveform List, double-click on the prop_amp_in signal. This is the input
command to the propeller system.
b) Drag-and-drop the prop signal into the Graph area. Both waveforms should
appear as shown in Figure 3.

Note that in the figure the background color has been set to white to allow
waveforms to be easily viewed when printed.

Figure 3 Input and output waveforms with pwm_vhdl model.

The input waveform (prop_amp_in) is designed to slowly ramp up the propeller speed, hold it
briefly at maximum speed, and then ramp it back down.
Notice that the actual speed waveform (prop) starts off at nearly 1387 rad/s! In fact, it only
increases from 1387 to about 1395 rad/s. This is because the motor is not yet loaded by a
propeller. We will look at load alternatives later in this lab.
5. Plot the pwm_out waveform as well. If you zoom in on this waveform, you can see
how the output width of the PWM tracks the amplitude of its input (prop_amp_in).

Copyright Mentor Graphics Corporation 2005 112


SystemVision Symbols and Models

Generate and Add Schematic-based PWM Symbol to Schematic


Now that automatic symbol generation has been demonstrated for a VHDL-AMS model,
the PWM will be replaced with a schematic-based mode. Again, a symbol will need to be
generated for this model as well.
1. Return to the schematic and delete the newly-added PWM symbol (for future use,
this symbol is now available from the Add Component dialog in the UAV_Prop
category).
2. Click on the Project tab in the ProjectNavigator Tree.
3. Click on the pwm_sch design to bring up the schematic-based PWM design. The
PWM schematic should look like that shown in Figure 4.

Figure 4 - Schematic-based design for PWM.

The schematic-based PWM design is implemented in two stages. The first stage is a
summing op amp that adds the input waveform (prop_amp_in) to a local sawtooth wave
generator. The sawtooth waveform oscillates at a frequency much greater than the input
waveform, and can be thought of as "riding on top of" the input waveform once they are
summed together.
The second stage of the design is a comparator that accepts the summed input/sawtooth
waveform, and generates a logic '1' if the amplitude of this waveform is greater than some
threshold value (the threshold is 0 in this design).

4. To generate a symbol for this schematic, click on the Symbol Wizard button, .
5. The Symbol Generation Dialog comes up. Verify that the Generate symbol from:
dropdown is set to Schematic, and that the Schematic name is set to pwm_sch.

The Symbol Wizard can also be used to generate symbols from VHDL-AMS
(compiled or source) and SPICE models.
6. Click OK.
7. Select the following nets to be used for pins on the symbol.

Copyright Mentor Graphics Corporation 2005 113


SystemVision Symbols and Models

INM
INP
DIG_OUT

8. Click OK. The Symbol Editor automatically comes up, with a default symbol shape,
along with the pins that were specified.
9. Reposition the INM and INP pins so that they are spaced a little farther apart (select
and drag each pin to do this).
10. Select File > Save and then File > Close from the menu to close out the Symbol Editor.
11. Select Add > Component with the airplane_prop design in view (select the airplane_prop tab
at the bottom of the schematic window to quickly navigate between views).
12. Place the newly-created pwm_sch symbol onto the schematic. Connect it as shown in
Figure 5.

Figure 5 - Airplane_prop with schematic-based PWM symbol.

13. Double-click on the newly-added symbol, and type in a label for it, (again, something
like PWM1 is fine). This will allow you to easily identify the PWM waveforms in the
Waveform Viewer.
14. RMB > Push Schematic on the new symbol to view the pwm_sch schematic.
15. With the pwm_sch model listing showing in the Main Window, select File > Close from
the menu to close the schematic.
Simulate with Time-domain Analysis and View Results
Now that the schematic-based PWM model has been instantiated, the airplane_prop design
can once again be simulated.
1. Simulate the design with the same settings as before. Again, it should take a minute
or so for the simulation to complete.
2. View results of the time domain analysis.
a) In the Waveform List, drag-and-drop the prop signal onto into the same graph
region where the waveforms from the previous analysis are displayed.

Copyright Mentor Graphics Corporation 2005 114


SystemVision Symbols and Models

b) Verify that both PWM models yield similar simulation results.


These results illustrate that both PWM models are functionally equivalent (at least as far as
the overall system is concerned). Depending on design requirements, modeling experience,
and ultimate implementation plans for a component, either the text-based VHDL-AMS or
the schematic-based modeling approaches may be preferred.
In either case, the SystemVision automated symbol-generation features will serve to greatly
simplify the process of using a model in a design.
Use the Model Wizard to Create Propeller Models
So far, we have concentrated on both text-based and schematic-based symbol creation using
SystemVision. In this section, you will create two versions of a propeller load model, which
will be attached to the motor. The first model you will create is a simple linear model that
represents the propeller loading effects as a straight-line function. The second model you
will develop represents the propeller loading as a non-linear function, using a piece-wise
linear (PWL) data lookup approach. The lookup data is supplied from a propeller data sheet.
The SystemVision Model Wizard will be used to help develop both models.
These exercises show you how to do the following tasks:
Create a standard all-analog VHDL-AMS model using the Model Wizard
Create a PWL-based VHDL-AMS model using the table-lookup (TLU) feature of
the Model Wizard
Create a Simple Analog VHDL-AMS Model
The first model you will create is a simple analog load that consumes torque as a linear
function of velocity. In other words, you will create a model whose torque consumption is
equal to its velocity times some scaling factor.
For this design, the scaling factor is given as 400e-6 (e.g. for the propeller to rotate at 1000
rad/s, a torque of 1000*400e-6 = 0.4 N-m will be required).
1. If necessary, load the airplane_prop design.
2. If you do not have SystemVision running, invoke it on the airplane_prop design (with
one of the PWM models you created in the previous exercise connected into the
design).
3. Select the following from the menu bar: Tools > Generate VHDL Model > New...

This displays the New Model dialog box.


4. Type in the following name for the new linear propeller model you will develop:
prop_lin, and click OK.

The VHDL Model Generation Tool window will be displayed. This is the window
from which you will develop a VHDL-AMS model. The window is divided into two
main regions. The region on the left lists the high-level labels for various portions of
a VHDL-AMS model, such as Generics, Ports, Architectures, etc. Clicking on any of
these labels activates the appropriate form in the right region of the window. The
actual model will be constructed from entries made in the form. The default form,

Copyright Mentor Graphics Corporation 2005 115


SystemVision Symbols and Models

Model Parameters, allows you to change the name and location of the model to be
generated.
5. Click on the Code Preview button near the bottom of the window. This will allow
you to view the actual VHDL-AMS model as it is being constructed.

The Code Preview window already shows the outline for a model called prop_lin,
along with a default architecture.

Note that the Code Preview window is read-only, and is intended for viewing code models can not
be edited from this window.
6. Arrange the VHDL Model Generation Tool window and the Code Preview window
on your computer display so you can view both windows simultaneously.
7. Add Generic

VHDL-AMS generics are constant parameters whose values can be changed from
the schematic in which the model is instantiated. A generic for the value of the
scaling factor (gain) will be added to the model.
a) Click on the Generics label in the left region of the window. This brings up the
Generics form.
b) Click the Add button in the form.
c) In the New Generic dialog, type the name: gain, and click OK.
d) In the Type dropdown menu, select real as the type of this generic.
e) Since we know that this application will require a gain of 400.0e-6, type that value
as the Default Value for the gain generic.
8. Add Port

The prop_lin model will require only one port to connect to the shaft of the DC
motor that drives it. The motor shaft is mechanical in nature.
a) Click on the Ports label to bring up the Ports form.
b) Click on the Add button in the form.
c) Type in the following name for the propeller port: shaft, and click OK. This port
represents the shaft of the propeller.

This is a conservation-based port, which means that conservation of energy laws


will be applied to it. Such ports are declared as terminals in VHDL-AMS.
d) Select terminal using the Class dropdown menu.

The nature of a terminal determines what "technology-type" it represents.


e) Select the following from the Nature dropdown menu: Mechanical Systems >
Rotational Velocity.

Copyright Mentor Graphics Corporation 2005 116


SystemVision Symbols and Models

This nature is required for the propeller shaft to correctly match the nature of
the motor shaft.
9. Create Architecture

The entity portion of the model has now been defined, which describes how the
model interfaces with other models in the system. A VHDL-AMS model architecture
is used to describe the functionality of a model.
a) Click on the [+] next to the Architectures label.
b) Click on the [+] next to the "default" architecture label.
c) Click on the Branches label, and click the Add button in the form.

A terminal port has two aspects of information associated with it: an across aspect
(like voltage or velocity), and a through aspect (like current or torque). In order to
access these aspects individually, the VHDL-AMS language supports "branch"
quantities. You will assign names to the across and through aspects of the model
using branch quantities.
d) Type vel (or some other name representing velocity) in the ACROSS field.
e) Type torq (or some other name representing torque) in the THROUGH field.
f) Select the port name (shaft) from the FROM dropdown menu.
g) Select ROTATIONAL_VELOCITY_REF from the TO dropdown menu.

The FROM/TO fields specify which port(s) a branch quantity represents. In the
case of a one port model, the branch exists from the port to an understood
reference point (i.e. ground). For a port with nature ROTATIONAL_VELOCITY, the
corresponding reference point ROTATIONAL_VELOCITY_REF is used.
10. Add Simultaneous Equation

The final step in the models' creation is to specify its actual functionality. For this
model, the branch quantities (vel and torq) and generic (gain) will be used to describe
this functionality.
a) Click on the Simultaneous Equations label, and click the Add button in the form.
b) Select unconditional as the Class of the equation, and click the OK button.
c) In the white space below the Set of simple simultaneous equations heading, type the
following equation:

torq == gain*vel;

This equation specifies that the torque (torq) consumed by the propeller model is
proportional to the velocity (vel) of the propeller times the gain value (gain).
11. Generate the Model

You have now completed the specification for the propeller load model.

Copyright Mentor Graphics Corporation 2005 117


SystemVision Symbols and Models

a) To generate the actual VHDL-AMS model (which will be identical to what is


shown in the Code Preview window), click on the Generate button.
b) Click Yes in response to the "Do you want to generate model and close this
tool?" dialog.

The generated model will come up in the SystemVision text editor. Take a
moment to look over the model.

Not only was the model itself generated, but a symbol for the model was
automatically created as well.
c) Click on the prop_lin tab near the bottom of the window to view the generated
symbol.
d) Save and close both the symbol and model.
12. Add Model to airplane_prop system

The next step is to hook up and test the model you just created.
a) With the airplane_prop tab selected, Select Add Component from the menu.
b) Place/connect the prop_lin model as illustrated in Figure 6.

Figure 6 - Airplane_prop with linear load attached to motor shaft.

c) Double-click on the newly-placed symbol and give it a label, such as PROP1.


Simulate with Time-domain Analysis and View Results
Now that a load has been added to the design, the airplane_prop design will be simulated to
determine its performance. The generic gain does not need to be given a value in the
schematic since you gave it a default value (400.0e-6) in the model. This default value will be
over-ridden by any value given to this generic at the schematic level.
1. Simulate the design with the same settings as before. Again, it should take a minute
or so for the simulation to complete.
2. View results of the time domain analysis.

Copyright Mentor Graphics Corporation 2005 118


SystemVision Symbols and Models

a) In the Waveform List, drag-and-drop the prop_amp_in and prop signals onto the
same graph region.

Note that the motor/propeller velocity now takes a little time to get up to speed.
b) Also plot the prop1/torq waveform in the same graph region (this is the torque
branch quantity you specified in the model).
c) Place a cursor on the graph, and position it so that the velocity reads about 1k
rad/s.

Note that the torq value reads about 0.4 N-m for a velocity of 1000 rad/s, as
predicted during the model development. The results should appear similar to
those given in Figure 7.

Figure 7 - Simulation results with linear load.

Create a Piece-wise Linear VHDL-AMS Model


The next model you will create is a piece-wise linear approximation of a nonlinear load
profile obtained from a propeller datasheet. As before, the propeller still consumes torque as
a function of velocity.
1. Select Tools > Generate VHDL Model > New... from the menu bar.

This again displays the New Model dialog box.


2. Type in the following name for the new piece-wise linear propeller model you will
develop: prop_tlu, and click OK.

The VHDL Model Generation Tool window that comes up.


3. Click on the Code Preview button near the bottom of the window. This will allow
you to view the actual VHDL-AMS model as it is being constructed.
4. Arrange the VHDL Model Generation Tool window and the Code Preview window
on your computer display so you can view both windows simultaneously.

Copyright Mentor Graphics Corporation 2005 119


SystemVision Symbols and Models

5. Add Port

As with the prop_lin model, the prop_tlu model will require one port to connect to the
shaft of the DC motor that drives it.
a) Click on the Ports label to bring up the Ports form.
b) Click on the Add button in the form.
c) Type in the following name for the propeller port: shaft, and click OK.

This is again a conservation-based port, which means that conservation of energy


laws will be applied to it. Such ports are declared as terminals in VHDL-AMS.
d) Select terminal using the Class dropdown menu.

The nature of a terminal determines what "technology-type" it represents. For the


propeller shaft to correctly match the motor shaft.
e) Select the following from the Nature dropdown menu: Mechanical Systems >
Rotational Velocity.

6. Create Architecture

You have now defined the entity portion of the model, which is identical to the
entity used in the prop_lin model, with the exception of the generic gain. You will next
describe the functionality of the model.
a) Click on the [+] next to the Architectures label.
b) Click on the [+] next to the "default" architecture label.
c) Click on the Branches label, and click the Add button in the form.
d) Type vel (or some other name representing velocity) in the ACROSS field.
e) Type torq (or some other name representing torque) in the THROUGH field.
f) Select the port name (shaft) from the FROM dropdown menu.
g) Select ROTATIONAL_VELOCITY_REF from the TO dropdown menu.
7. Add Lookup Function

This version of the propeller model includes velocity/torque data pairs from a
datasheet. This data will be accessed using a VHDL-AMS function.
a) Click on the Subprograms label and then click the Add button on the
Subprograms form.
b) Type in prop_lookup as the subprogram name and click OK.
c) Select Function from the Class dropdown menu.
d) Click the Implement from Table Data checkbox. The Return Type is automatically set
to real.
e) Click on the Table Lookup button. The Load table data from file form appears.

Copyright Mentor Graphics Corporation 2005 120


SystemVision Symbols and Models

f) Select the prop_pwl.txt file (in the /hdl directory), and click the Open button.

The Fit Table LookUp Data form appears. This form lists the values from the
data file. The data in this table can also be typed in manually.
8. Curve Fit with Linear Interpolation and View Results
a) To view the transfer function of the data, click the New Curve Fit button.
b) The New Curve Fit dialog appears. Accept the default settings to create a
waveform called curve0.

This waveform is constructed by employing a one-dimensional linear


interpolation of the data.
c) Click the Plot Curves button, then click OK in the Plot Curves dialog.
d) Click OK in the Set Waveform Parameters dialog.

The curve will now be displayed in the Waveform Viewer.


9. Curve Fit with Cubic Spline Interpolation and View Results
a) To view the transfer function of the data, click the New Curve Fit button.
b) The New Curve Fit dialog appears. Select Cubic Spline Interpolation from the
Interpolation Method dropdown menu.
c) If necessary, type in or change the default Curve Fit Name to curve1.
d) Click OK to create a waveform called curve1.
e) Click the Plot Curves button.
f) Verify that both curve0 and curve1 are selected, and click OK in the Plot Curves
dialog.
g) Click OK in the Set Waveform Parameters dialog.

The curves will now be displayed in the Waveform Viewer. They should look
similar to those shown in Figure 8.

Copyright Mentor Graphics Corporation 2005 121


SystemVision Symbols and Models

Figure 8 - Curve fits with linear and cubic Spline interpolation.

h) Zoom in on various portions of the curves to view the effects the chosen
interpolation method.

An example for a region near the upper-end of the waveforms is shown in Figure
9.

Figure 9 - Zoomed curve fit waveforms.

i) Minimize the Waveform Viewer.


j) Select curve0 in the Selected Curve dropdown menu in the Fit Table Lookup
Data form.

This curve is selected so the original data is used for the model without the
smoothing effects of the Cubic Spline Interpolation.
k) Click OK to generate the model statements required to implement the lookup
function.
10. Add Simultaneous Equation

The final step in the model creation is to specify the actual functionality of the
model. For this model, the branch quantities and lookup function will be used to
describe this functionality.
a) Click on the Simultaneous Equations label, and click the Add button in the form.
b) Select unconditional as the Class of the equation, and click the OK button.
c) In the white space below the Set of simple simultaneous equations heading, type the
following equation:

torq == prop_lookup(vel);

This equation specifies that the torque (torq) consumed by the propeller model is

Copyright Mentor Graphics Corporation 2005 122


SystemVision Symbols and Models

determined as a function of the velocity (vel). The relationship between torque


and velocity is specified by the data that is accessed by the prop_lookup function.
11. Generate the Model

You have now completed the specification for the data-based propeller load model.
a) To generate the actual VHDL-AMS model click on the Generate button.
b) Click Yes in response to the "Do you want to generate model and close this
tool?" dialog.

The generated model will come up in the SystemVision text editor. Take a
moment to look over the model. It appears a bit more involved than the
previous model.

Click on the prop_tlu tab near the bottom of the window to view the generated
symbol.
c) Save and close both the symbol and model.
12. Add Model to airplane_prop System

The next step is to hook up and test the model you just created.
a) With the airplane_prop tab selected, delete the existing propeller symbol from the
schematic.
b) Select Add Component from the menu.
c) Place/connect the prop_tlu model as previously illustrated in Figure 6.
d) Double-click on the newly-placed symbol and give it a label, such as PROP1.
Simulate with Time-domain Analysis and View Results
Now that the new load has been added to the design, the airplane_prop design will be
simulated to determine its performance.
1. Simulate the design with the same settings as before. It should take a few minutes for
the simulation to complete.
2. View results of the time domain analysis.
a) In the Waveform List, drag-and-drop the prop signal onto the same graph region
used in the previous simulation (close out any curve-fitting windows, if desired).
b) Also plot the prop1/torq waveform in the same graph region.

If you place a cursor on the vel waveform, the corresponding torq value should
match that given in the data file (which you can view by opening the prop_pwl.txt
file in the Auxiliary Files folder).
c) Compare the waveforms generated by the two models. The new simulation
results are more accurate because the propeller is modeled from actual datasheet
data.

Copyright Mentor Graphics Corporation 2005 123


SystemVision Symbols and Models

Lab Summary
This lab focused on two SystemVision features: symbol creation and model creation. Basic
symbols for both VHDL-AMS and SPICE models are created automatically by simply
dragging the model into the schematic canvas. Schematic-based model symbols are also
generated automatically using the Symbol Wizard.
Two VHDL-AMS models were created using the Model Wizard. The Model Wizard helped
to guide the process of creating a model, and automatically generated most of the syntax for
the models. The table lookup feature of the Model Wizard was also discussed, which
automatically generates functions for piece-wise linear model development. Various curve-
fitting options were considered during this process as well.

Copyright Mentor Graphics Corporation 2005 124


Unmanned Aerial Vehicle Introduction

Unmanned Aerial Vehicle (UAV) Introduction

Copyright Mentor Graphics Corporation 2005


All Rights Reserved.

This document contains information that is proprietary to Mentor Graphics Corporation.


The original recipient of this document may duplicate this document in whole or in part for
internal business purposes only, provided that this entire notice appears in all copies. In
duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the proprietary information.

Copyright Mentor Graphics Corporation 2005 125


Unmanned Aerial Vehicle Introduction

Unmanned Aerial Vehicle (UAV)


Design with SystemVision

Unmanned Aerial Vehicle (UAV)

SystemVision
SystemVision System Modeling Solution 2

Copyright Mentor Graphics Corporation 2005 126


Unmanned Aerial Vehicle Introduction

Tool Requirements for UAV Design


Mixed-signal

Mixed-technology

Multi-language

Large, complex system

Hierarchical levels

SystemVision
SystemVision System Modeling Solution 3

UAV Command Inputs


Input from joystick
controller

Two channels:
throttle and rudder

SystemVision
SystemVision System Modeling Solution 4

Copyright Mentor Graphics Corporation 2005 127


Unmanned Aerial Vehicle Introduction

Serial Bitstream
Analog inputs are
digitized

serialized

and time-domain
multiplexed into a
bitstream

SystemVision
SystemVision System Modeling Solution 5

RF Tx and Rx
RF Tx and Rx uses
BFSK (Binary
Frequency Shift
Keying)

Recovered data is
reformatted into serial
bitstream format

SystemVision
SystemVision System Modeling Solution 6

Copyright Mentor Graphics Corporation 2005 128


Unmanned Aerial Vehicle Introduction

Pulsewidth Encoding
Bitstream data
converted into variable
pulsewidths

Standard approach to
promote servo
interchangeability

SystemVision
SystemVision System Modeling Solution 7

Digitized Analog Commands


PW data converted
back into analog
signals composed of
discrete steps

These signals used to


drive throttle and
rudder

SystemVision
SystemVision System Modeling Solution 8

Copyright Mentor Graphics Corporation 2005 129


Unmanned Aerial Vehicle Introduction

Propeller Speed/Torque
Throttle commands
result in propeller
speed and torque

Propeller is open
loop and relies on air
drag to slow it down

SystemVision
SystemVision System Modeling Solution 9

DC/DC Converter
Propeller needs 42V
from battery pack

Rudder electronics
needs 4.8V for on-board
electronics

DC/DC converter
provides 4.8V from 42V

Line regulation to dip


in input voltage
illustrated

SystemVision
SystemVision System Modeling Solution 10

Copyright Mentor Graphics Corporation 2005 130


Unmanned Aerial Vehicle Introduction

Rudder Position
Rudder position is
what is ultimately
controlled

Rudder is closed-
loop so its profile
should match
commanded profile

SystemVision
SystemVision System Modeling Solution 11

System Design:
Defining Subsystems

SystemVision
SystemVision System Modeling Solution 12

Copyright Mentor Graphics Corporation 2005 131


Unmanned Aerial Vehicle Introduction

UAV Subsystem Definitions

Command/Control
(C&C) Subsystem
C&C Communications
C&C
Communications
Subsystem

Throttle
Subsystem Throttle
Power
Power
Subsystem

Rudder
Subsystem

Rudder

SystemVision
SystemVision System Modeling Solution 13

Copyright Mentor Graphics Corporation 2005 132


Unmanned Aerial Vehicle Introduction

UAV Technologies
UAV color-coded to
highlight technology
types

Multiple colors/block
implies mixed-
technology

Next, we will look at


the individual
subsystems

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 14

Instructor Notes/Comments
UAV components are color-coded to labels on bottom. This is a bit of a
generalization to keep discussion simple (most of the digital/firmware sections
may actually be implemented as software).
Figure illustrates various boundary conditions as they might exist for this type
of system. It is necessary to be able to simulate everything together

Copyright Mentor Graphics Corporation 2005 133


Unmanned Aerial Vehicle Introduction

C&C Subsystem
C&C subsystem provides
overall control for UAV
Performs both digital and
analog functions
Will likely require both
digital and firmware
design

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 15

Encoder Block
Encoder block converts analog input commands into digital words, which are
then serialized and used to create a bitstream suitable for wireless
communications.

Analog/Controls Digital/Firmware

SystemVision
SystemVision System Modeling Solution 16

Copyright Mentor Graphics Corporation 2005 134


Unmanned Aerial Vehicle Introduction

Encoder State Machine

Since SystemVision
supports VHDL-AMS,
multiple front-end tools
can generate the state
machine code.

Digital/Firmware

SystemVision
SystemVision System Modeling Solution 17

Communications Subsystem
Comm subsystem
accepts digital inputs
and produces digital
outputs
Internally, signals are
analog

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 18

Copyright Mentor Graphics Corporation 2005 135


Unmanned Aerial Vehicle Introduction

Communications System
Communications block accepts serial bitstream as an input, and performs a
binary frequency shift keying (BFSK) conversion on the bitstream. The BFSK
representation of the bitstream can then be transmitted/received over an RF
link.

BFSK_OUT
INPUT F_OUT

LPF

BFSK PLL
Prog LF_OUT gain A/D Bitstream Out
Source D_IN A_OUT INPUT

VCO_OUT Frequency

Pseudo
Bitstream

VCO_OUT
INPUT F_OUT

Analog/Controls Digital/Firmware

SystemVision
SystemVision System Modeling Solution 19

Communications Subsystem Waveforms


Bitstream In

BFSK Freq

PLL Out

LPF Out

Bitstream Out

SystemVision
SystemVision System Modeling Solution 20

Copyright Mentor Graphics Corporation 2005 136


Unmanned Aerial Vehicle Introduction

Throttle Subsystem
Motor sizing dependent
on load presented by
propeller
Propeller torque as a
function of speed
available from propeller
manufacturer
This data is
implemented in
VHDL-AMS using
PWL lookup function

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 21

Propeller Torque/Speed Curve


Speed Torque
Data-based models can be developed using PWL lookup function.
471.2 0.233
VHDL-AMS allows lookup function to be customized to user needs.
523.6 0.2865

576 0.347

628.3 0.4138

680.7 0.485 Torque=f(Speed)


Torque=f(Speed)

733 0.563 1.2


1.2
11
785.4 0.645
0.8
0.8
Torque
Torque

837.7 0.735 0.6


0.6
0.4
0.4
890 0.83 0.2
0.2
00
942.5 0.93
471
471 571
571 671
671 771
771 871
871 971
971 1071
1071
994.8 1.08 Speed
Speed

SystemVision
SystemVision System Modeling Solution 22

Copyright Mentor Graphics Corporation 2005 137


Unmanned Aerial Vehicle Introduction

Power Subsystem
Converter requirements
derived from UAV
system specs, primarily,
rudder servo error

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 23

Buck Converter
Buck converter developed with combination of analog components and
S-domain control blocks. Both averaged and switching version
implemented. This subsystem will be integrated with Rudder Subsystem.

Analog/Controls

SystemVision
SystemVision System Modeling Solution 24

Copyright Mentor Graphics Corporation 2005 138


Unmanned Aerial Vehicle Introduction

Rudder Subsystem
Rudder subsystem developed
using multiple approaches
Control block (S-
domain)
Mixed S-domain,
electrical, mechanical
domains (VHDL-AMS)
Mixed electrical
(SPICE), mechanical
domains (VHDL-AMS)
Mixed electrical ,
mechanical (VHDL-
AMS), software
domains (C)

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 25

S-Domain Servo Implementation


A common way to begin a servo design is to start at the abstract S-domain
level. This approach accommodates a controls-oriented viewpoint.

Load
Constant Gain

Compen-
Summer Gain sator Limiter Lag Gain Lag Gain Integrator Limiter
Input Output

Gain

Gain

Analog/Controls

SystemVision
SystemVision System Modeling Solution 26

Copyright Mentor Graphics Corporation 2005 139


Unmanned Aerial Vehicle Introduction

Rudder System Mixed-Technology


After the initial design, a mixed-technology version of the design will likely be
implemented to model additional subsystem properties such as power, thermal,
and loading effects. These are difficult to model using S-domain blocks only.
Servo/
Amplifier DC Motor Translational Rudder
Gearbox
Linkage

Control Control
Horn Horn

Mechanical Stop
Potentiometer

Analog/Controls Mechanical Software

SystemVision
SystemVision System Modeling Solution 27

Servo Controller
We may still leverage S-domain blocks where they are useful. This may
be the case when the analog specialist wants to test the subsystem
before actual software algorithms are developed.

Lead-Lag Limiter
Summer Gain
Input Output

Gain
Feedback

Analog/Controls

SystemVision
SystemVision System Modeling Solution 28

Copyright Mentor Graphics Corporation 2005 140


Unmanned Aerial Vehicle Introduction

SPICE Servo Implementation


If the final implementation will be hardware-based, we can test very specific op
amps to see which works best (i.e. speed, power supply considerations,
saturation levels, etc.). Due to the magnitude of sheer SPICE models available,
the appropriate op amp models will likely be available.

***************POLE
***************POLE STAGE************
STAGE************
**
*Fp=13.3
*Fp=13.3 MHz
MHz
G3
G3 98
98 15
15 99 49
49 1E-3
1E-3
R12
R12 98
98 15
15 1K
1K
C5
C5 98
98 15
15 11.967P
11.967P
**
************POLE/ZERO
************POLE/ZERO STAGE**********
STAGE**********
**
*Fp=600
*Fp=600 KHz,
KHz, Fz=
Fz= 1.4MHz
1.4MHz
G5
G5 98
98 18
18 15
15 49
49 1E-3
1E-3
R14
R14 98
98 18
18 1K
1K
R15
R15 98
98 19
19 750
750
C6
C6 19
19 18
18 151.58P
151.58P
**

SystemVision
SystemVision System Modeling Solution 29

VHDL-AMS C-Code Wrapper


If the final servo implementation will be software-based, we create a
VHDL-AMS wrapper model, from which we call C routines as functions.

Once a baseline model is developed, the software specialist can test


algorithm changes using this model.

begin -- proc
if clk'event and (clk='1' or clk='H') then
v_input(0) := vin;
v_input(1) := A;

computing1 : VHDL_Compute1(v_input, v_output);

z_out <= v_output(0);


ll_in_dly1 <= v_output(1);
ll_out_dly1 <= v_output(2);
end if;
end process;
vout == z_out'ramp(100.0e-9);

SystemVision
SystemVision System Modeling Solution 30

Copyright Mentor Graphics Corporation 2005 141


Unmanned Aerial Vehicle Introduction

System Integration
Once we have developed and tested the individual
subsystems, we can get our greatest benefit from this
environment: analyzing complex systemic interactions
between subsystems.

This is difficult, if not impossible to achieve without a


common development environment in which subsystems
may be integrated together as a system.

SystemVision
SystemVision System Modeling Solution 31

Integrating C&C with Rudder Subsystem


Integrating the Command and Control and Rudder Subsystems for the first time, we
note some undesirable ripple riding on the rudder position. Does this violate our error
specification?

C&C Rudder

SystemVision
SystemVision System Modeling Solution 32

Copyright Mentor Graphics Corporation 2005 142


Unmanned Aerial Vehicle Introduction

Servo Error Unfiltered/Filtered


We compare this servo error to the error when driving the Rudder
Subsystem with an ideal voltage source and find that we are violating
our error margin. We solve the problem by adding low-pass filters
between C&C and Rudder Subsystems.

C&C Rudder

C&C Filter Rudder

SystemVision
SystemVision System Modeling Solution 33

Servo Error vs. Supply Level


We now turn our attention to servo error as a function various voltage
supply levels. We see that as the voltage drops, the servo error
increases. Our DC/DC converter should protect against this possibility.

SystemVision
SystemVision System Modeling Solution 34

Copyright Mentor Graphics Corporation 2005 143


Unmanned Aerial Vehicle Introduction

Rudder and Power Subsystems


Eventually, the Rudder Subsystem will receive power from the DC/DC converter.
This power will be delivered to the motor through an h-bridge.

Servo/
Amplifier DC Motor Gearbox Translational Rudder
Linkage
Power
Amplifier
Control
Horn Control
Horn
Mechanical
Potentiometer
Stop

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 35

Rudder Power Amplifier


Rudder PWM and h-bridge. How does the Rudder Subsystem respond to the
non-ideal power supplied from the DC/DC converter?

Motor
MOTOR

Analog/Controls Digital/Firmware Mechanical

SystemVision
SystemVision System Modeling Solution 36

Copyright Mentor Graphics Corporation 2005 144


Unmanned Aerial Vehicle Introduction

Motor Current with Power Subsystem


Unfortunately, there is an unexpected 80-200Hz oscillation in the motor current.
It looks as though the DC/DC filter components are interacting with the motor
parameters. This will need to be analyzed further.

SystemVision
SystemVision System Modeling Solution 37

Rudder Accuracy vs. # Bits


We can also test out the overall system accuracy and stability as a
function of system bits. Here we show decreasing system
performance to crosswind as a function of number of bits.

SystemVision
SystemVision System Modeling Solution 38

Copyright Mentor Graphics Corporation 2005 145


Unmanned Aerial Vehicle Introduction

UAV System Performance


Throttle input
modeled as simple
analog voltage source

Rudder input applied


through mental and
physical dynamics of
human controlling the
UAV

Having the ability to


model in the s-domain
is useful for this test
(this will not be
implemented on the
actual UAV)

Analog/Controls Digital/Firmware Mechanical Software

SystemVision
SystemVision System Modeling Solution 39

Human Controller
Human controller is modeled using S-domain blocks. This is useful
to study human-in-the-loop but will not be required in the system
deliverable. Our common development environment allows this
functionality to be easily integrated into the full system.

1
+
input + 4
s+ 4
0.1 +
s
fb

Analog/Controls

SystemVision
SystemVision System Modeling Solution 40

Copyright Mentor Graphics Corporation 2005 146


Unmanned Aerial Vehicle Introduction

UAV Response to Crosswind


Finally, we can look at our overall system performance as a
function of crosswind (i.e. how well the operator/system
responds to the crosswind changes).

SystemVision
SystemVision System Modeling Solution 41

Unmanned Aerial Vehicle Summary


A powerful and flexible design and analysis environment is critical for
system development. Such an environment must at minimum support:
Quick development of new models
The ability to leverage existing models from multiple sources
The ability to develop models and simulate a variety of technology types
not just electronics
The ability to integrate software algorithms on the hardware upon which it
will be implemented

The UAV was completely modeled using the SystemVision System


Modeling Solution, which allowed team members to:
Leverage existing models from multiple sources
Develop new multi-physics models using standardized formats, which
promote industry adoption and re-use
Model at various levels of abstraction
Integrate and test software with the hardware upon which it was
implemented

SystemVision
SystemVision System Modeling Solution 42

Copyright Mentor Graphics Corporation 2005 147


Unmanned Aerial Vehicle Introduction

For More Information


Visit the SystemVision website for:

Free SystemVision software download and labs

Tech papers and examples

Full descriptions of the VHDL-AMS subsystems and models used in


this workshop, as case studies to the book: The System Designers
Guide to VHDL-AMS (ISBN # 1-55860-749-8).

www.mentor.com/systemvision

SystemVision
SystemVision System Modeling Solution 43

UAV Labs
The following lab exercises allow students to use
SystemVision on a relatively large system. The
following UAV Help files are included:

Help on CS1 Airplane Controller


Help on CS2 Rudder System
Help on CS3 Power Converter
Help on CS4 Communications System
Help on CS5 RC Airplane (UAV)

SystemVision
SystemVision System Modeling Solution 44

Copyright Mentor Graphics Corporation 2005 148


Unmanned Aerial Vehicle Introduction

SystemVision
SystemVision System Modeling Solution 45

Copyright Mentor Graphics Corporation 2005 149


Help on CS1_AirplaneController

Case Study 1:
The Airplane Controller System

Control Stick Analog to Bitstream RF Transmit/Receive

Motor/Propeller
Throttle Amp
Bitstream to Pulse-Width Pulse-Width to Analog
Amp

Rudder Servo & Amp

s+a
s+b
+ Buck Converter
Battery DC Motor/Rudder
(42 V) DC Assembly

Copyright Mentor Graphics Corporation 2005


All Rights Reserved.

This document contains information that is proprietary to Mentor Graphics Corporation.


The original recipient of this document may duplicate this document in whole or in part for
internal business purposes only, provided that this entire notice appears in all copies. In
duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the proprietary information.

Copyright Mentor Graphics Corporation 2005 151


Help on CS1_AirplaneController

Copyright Mentor Graphics Corporation 2005 152


Help on CS1_AirplaneController

Case Study 1:
The Airplane Controller System

This help file discusses how to use SystemVision to simulate a mixed-signal Airplane
Controller System (also referred to as the Command and Control System). The Airplane
Controller System is part of a remote controlled (RC) electric airplane system (also referred
to as a UAV system), which is detailed through five case studies in the book The System
Designers Guide to VHDL-AMS.
The RC Airplane System is illustrated in Figure 1. The Airplane Controller System is
indicated by the shaded boxes. For more detailed information on the Airplane Controller
System, please refer to the accompanying file: vhdl-ams-book-chapter-8.pdf. This file comprises
the book chapter which corresponds to the Airplane Controller System design.
Control Stick Analog to Bitstream RF Transmit/Receive

Motor/Propeller
Throttle Amp
Bitstream to Pulse-Width Pulse-Width to Analog
Amp

Rudder Servo & Amp

s+a
s+b
+ Buck Converter
Battery DC Motor/Rudder
(42 V) DC Assembly

Figure 1 - RC Airplane System with Airplane Controller System highlighted.

The SystemVision project CS1_Mixed_Signal (so named because it highlights mixed


analog/digital design techniques), contains a top-level test bench for exploring this system.
This help file will illustrate how to simulate this test bench and analyze the results.
Design Selection/Viewing/Editing
1. Make sure the CS1_Mixed_Signal project is loaded into SystemVision.
2. From the Project tab, click on Design Roots > airplane_controller to open the top-level
system schematic. A schematic similar to that illustrated in Figure 2 should appear.

The purpose of the Airplane Controller System is to send digitized versions of the
input analog commands (which issue from a hand-held joystick controller), through
an RF transmitter/receiver pair, and properly decode the signals in order to control
the rudder position and propeller speed of the airplane.

Copyright Mentor Graphics Corporation 2005 153


Help on CS1_AirplaneController

Control Stick
Throttle Digitize/Encode Decode/PW PW/Analog
PW (12 ms)

Bitstream
Control Stick
Rudder PW/Analog
PW (12 ms)

Figure 2 - Airplane Controller schematic used for simulation.

Simulating the System


1. In the Design Roots[STD] folder, RMB on airplane_controller and select Simulate Design:
airplane_controller to invoke the Simulation Control window (there is also a simulation
icon available on the icon bar). This method of invoking a simulation session is
preferred when it is the first time a design is netlisted and simulated.

The VHDL-AMS files will be compiled as necessary, and the Simulation Control
window will appear. This window contains four tabs:
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. Enable the Time-Domain Analysis and set End Time to 1 sec.
The Results tab allows users to select signals for viewing. The default selection is
TopLevel Waveforms which will save all signals at the highest level of hierarchy.
Users can also choose Selected Waveforms and click on the browse button ()
to select individual signals, or All Signals, which makes every available signal in
the design available for viewing.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation.
Viewing Results
The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the rudder_cmd and rudder_out waveforms. It will be
easier to compare the waveforms if they are placed into the same graph region.
2. Repeat this step for the throttle_cmd and throttle_out waveforms. These waveforms
should appear as shown in Figure 3.

Copyright Mentor Graphics Corporation 2005 154


Help on CS1_AirplaneController

Figure 3 - Throttle and rudder input commands and their digitized equivalents.

Note that the output signals are time-discrete replicas of the input signals. These signals are
then fed into the Rudder System, which is described in the CS2_Mixed_Technology case study.
Explore Other Signals
1. Using the same approach as above, explore some other simulation waveforms in this
design. Some interesting signals to look at are suggested below:
rudder_servo_in (varying pulse width voltage which drives the airplane rudder
servo)
throttle_servo_in (varying pulse width voltage which drives the airplane throttle
servo)
tdm_bitstream (bitstream data from Encoder to Decoder)

The rudder_servo_in (throttle_servo_in) voltages vary in pulse width from 1ms to 2ms
in response to the operator commands. These signals are sent to the servo units
on the airplane.

The tdm_bitstream signal contains all the encoded information which is trans-
mitted from the ground operator to the airplane. Examination of any data frame
will show the actual bit values that are sent. Each frame occurs at 20ms intervals.
2. Users should also take some time to explore the various blocks in the design. Most
of them are hierarchical, and contain schematics that detail the system operation.
3. After exploring the various blocks, add signals of interest to the Signal List in the
Results tab of the Simulation Control window, and re-simulate the design to view the
new signals.
4. Again, for more detailed information on the Airplane Controller System, please refer
to the accompanying file: vhdl-ams-book-chapter-8.pdf.

Copyright Mentor Graphics Corporation 2005 155


Help on CS2_Rudder_System

Case Study 2:
The Rudder System

Control Stick Analog to Bitstream RF Transmit/Receive

Motor/Propeller
Throttle Amp
Bitstream to Pulse-Width Pulse-Width to Analog
Amp

Rudder Servo & Amp

s+a
s+b
+ Buck Converter
Battery DC Motor/Rudder
(42 V) DC Assembly

Copyright Mentor Graphics Corporation 2005


All Rights Reserved.

This document contains information that is proprietary to Mentor Graphics Corporation.


The original recipient of this document may duplicate this document in whole or in part for
internal business purposes only, provided that this entire notice appears in all copies. In
duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the proprietary information.

Copyright Mentor Graphics Corporation 2005 157


Help on CS2_Rudder_System

Copyright Mentor Graphics Corporation 2005 158


Help on CS2_Rudder_System

Case Study 2:
The Rudder System

This help file discusses how to use SystemVision to simulate various Rudder System design
implementations. The Rudder System is part of a remote controlled (RC) electric airplane
system (also referred to as a UAV system), which is detailed through five case studies in the
book The System Designers Guide to VHDL-AMS.
The RC Airplane System is illustrated in Figure 1. The Rudder System is indicated by the
shaded box. For more detailed information on the Rudder System, please refer to the
accompanying file: vhdl-ams-book-chapter-14.pdf. This file comprises the book chapter which
corresponds to the Rudder System design.
Control Stick Analog to Bitstream RF Transmit/Receive

Motor/Propeller
Throttle Amp
Bitstream to Pulse-Width Pulse-Width to Analog
Amp

Rudder Servo & Amp

s+a
s+b
+ Buck Converter
Battery DC Motor/Rudder
(42 V) DC Assembly

Figure 1 - RC Airplane System with Rudder System highlighted.

The SystemVision project CS2_Mixed_Technology (so named because it highlights mixed


electrical/mechanical design techniques), contains a series of test benches that explore
various approaches to modeling and simulating the design. This help file will discuss these
various test benches, which are summarized below.
Rudder System Implementations
Rudder System Implementation Approach
Rudder_Control_Block Control systems style design where system
is composed of high-level behavioral
blocks. Laws governing energy
conservation are not intrinsic to the
individual models.
Rudder_Mech_Domain Mixed-technology design where the system
is composed of conservation-based models
from appropriate domain (i.e. electrical,
mechanical).
Rudder_SPICE_AMS Multi-language design with servo

Copyright Mentor Graphics Corporation 2005 159


Help on CS2_Rudder_System

subsystem composed of only SPICE


models, or a mix of SPICE and VHDL-
AMS models.
Rudder_Z_Domain Mixed HW/SW design with servo
subsystem designed with various Z-
domain modeling approaches, including a
full C-based servo controller implemen-
tation.

Rudder System configurations not discussed in the book are also presented in this Help file.
In particular, a SPICE version of the servo subsystem is demonstrated, as well as an
extended example illustrating software in the loop capabilities.
Control Block Rudder System
The Rudder Control Block implementation is shown in Figure 2. This is a full, closed-loop
control block implementation of the Rudder System. The models used in this design do not
intrinsically obey energy conservation laws. This is an abstract topology, which is used
primarily to test system error and stability specifications.
Design Selection/Viewing/Editing
1. Make sure the CS2_Mixed_Technology project is loaded into SystemVision.
2. From the Simulation tab (in the ProjectNavigator Tree), click on TestBenches >
rudder_control_block to open the schematic.

Load Constant Gain


k k

Compen-
Summer Gain sator Limiter Lag Gain Lag Gain Integrator Limiter
Input + s+a + k k 1 Output
k s+b s+a
k + s+a
k s

+

Servo Rudder
Gain
k
Gain Motor
k

Figure 2 - Control block implementation of Rudder System.

Simulating the Circuit


1. Set the rudder_control_block as the active test bench: RMB > Set As Active Testbench, and
select Simulation > Simulate to invoke the Simulation Control window (there is also a
simulation icon available on the icon bar).

The VHDL-AMS files will be compiled as necessary, and the Simulation Control
window will appear. This window contains four tabs:

Copyright Mentor Graphics Corporation 2005 160


Help on CS2_Rudder_System

The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to 1
sec.
The Results tab allows users to select signals for viewing. The default selection is
TopLevel Waveforms which will save all signals at the highest level of hierarchy.
Since this is a small design, All Signals was selected for convenience. Users can
also choose Selected Waveforms and click on the browse button () to select
individual signals.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation.
Viewing Results
The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the src_in and rudder_out waveforms. These
waveforms should appear as shown in Figure 3.

Figure 3 - Command and resulting rudder position waveforms.

Note that the (electrical) input signal, src_in is scaled from 0 to 4.7 V, and the (rotational)
output signal, rudder_out is scaled from 0 to ~1 rad. Since we are using abstract models, both
input and output have the same units (volts).
Users are also encouraged to further explore this implementation by running a Frequency
Domain analysis.

Copyright Mentor Graphics Corporation 2005 161


Help on CS2_Rudder_System

Mixed Electro-mechanical Rudder System


The Electro-mechanical Rudder System implementation is shown in Figure 4. This is the full
electro-mechanical system in which conservation-based models allow real-world physical
effects to be intuitively incorporated into the design.
Design Selection/Viewing/Editing
1. Make sure the CS2_Mixed_Technology project is loaded into SystemVision.
2. From the Simulation tab, click on TestBenches > rudder_mech_domain to open the
schematic.
Servo/Amplifier DC Motor Rudder
Gear Box Translational
Linkage
+ s+a
s+b

+ Control Control

Horn Horn

Mechanical
Potentiometer Stop

Figure 4 - Mixed-Technology (electro-mechanical) implementation of Rudder System.

The servo design for this system is shown in Figure 5. As shown, this design uses control
blocks like those used for the entire design in Figure 4. However, in this case, these control
blocks are fluently integrated with the true conservation-based electro-mechanical
components/effects that comprise the rest of the system.
Summer Gain Lead-Lag Limiter
Input + s+a Output
k
s+b

Gain
Feedback
k

Figure 5 - Servo design for Rudder_Mech_Domain implementation.

Simulating the Circuit


1. Set the rudder_mech_domain design as the active testbench, and select Simulation >
Simulate to invoke the Simulation Control window (there is also a simulation icon
available on the icon bar). The VHDL-AMS files will be compiled as necessary, and
the Simulation Control window will appear.
2. Verify the Time-domain Analysis End Time is set to 1 sec.
3. Click the OK button to run the simulation (the Output Window will display the
simulation progress and any error messages that may be issued).
Viewing Results

Copyright Mentor Graphics Corporation 2005 162


Help on CS2_Rudder_System

The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the rudder_out waveform. It will be easier to
compare the waveform to the previous simulation waveforms if they are placed into
the same graph region. These waveforms should appear as shown in Figure 6.

Note that the rudder_out_control waveform has been moved to its own axis to allow it
to easily be compared to the rudder_out_mech waveform. This was done by right-
clicking on the rudder_out_control waveform, and selecting Move to New Y Axis.

Also note that some waveform names may have been renamed in the Waveform
Viewer. This is useful when adding waveforms from multiple simulation runs with
the same name onto the same graph region. This is accomplished by double-clicking
on a waveform name in the signal pane, and changing the name in the Waveform
Properties window. Other aspects of waveform appearance are also controlled
through this window.

Figure 6 - Waveforms illustrating electro-mechanical rudder performance.

Mixed SPICE/VHDL-AMS Rudder System


The SPICE/VHDL-AMS Rudder System implementation is illustrated in Figure 7. For this
system, the entire servo is implemented in two ways: as a single SPICE sub-circuit; and as a
schematic-based combination of VHDL-AMS and SPICE models. Using SPICE and/or
VHDL-AMS at this level allows the designer to analyze the effects of components (for
example, the op amps), which may be used in the system. In this case, maximum voltage
swing overdrive recovery time can severely alter the systems performance.
Either of these servo implementations may be selected from the SystemVision schematic
environment.

Copyright Mentor Graphics Corporation 2005 163


Help on CS2_Rudder_System

Design Selection/Viewing/Editing
1. Make sure the CS2_Rudder_System project is loaded into SystemVision.
2. From the Simulation tab, click on TestBenches > rudder_spice_ams to open the
schematic. An implementation similar to that illustrated in Figure 7 will appear.

ROT

Figure 7 - SPICE/AMS implementation of Rudder System.

The servo design for this system is illustrated in Figure 8. As shown, this design consists of
electrical components. The op amps in this design are SPICE-based, and the rest of the
components are VHDL-AMS-based. Alternatively, the entire servo design illustrated in the
figure is modeled as a single SPICE sub-circuit. Users select which servo implementation to
simulate from the schematic. This illustrates the ease with which multi-language as well as
multi-domain design is supported by SystemVision.
3. To configure the design to run with the mixed-VHDL-AMS/SPICE schematic
configuration, perform the following steps:
a) on the SERVO_SPICE_AMS block. If necessary, in the
RMB > Edit Model Properties
General tab, set the Simulation Model Type to Schematic.
b) on the same block. This shows the combined VHDL-
RMB > Push Schematic
AMS/SPICE schematic.
By selecting RMB > Push Language on various components, you can see that the op amps are
modeled in SPICE, whereas the remaining components are modeled in VHDL-AMS.
C2
C5
R2
Servo_in R5
R1

R3
R4
X1 Servo_Out
Summer C4 X2
Lead-Lag

C6

R6
V1

R7 Pos_FB

X3

Potentiometer_FB V2

Figure 8 - SPICE servo design for Rudder_Mech_Domain implementation.

Copyright Mentor Graphics Corporation 2005 164


Help on CS2_Rudder_System

4. Close the SERVO_SPICE_AMS schematic.


Simulating the Circuit
1. Set the rudder_spice_ams design as the active testbench, and select Simulation >
Simulate to invoke the Simulation Control window (there is also a simulation icon
available on the icon bar). The VHDL-AMS files will be compiled as necessary, and
the Simulation Control window will appear.
2. Verify that the End Time in for Time-domain Analysis is 1 sec.
3. Click the OK button to run the simulation.
Viewing Results
The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use the drag-and-drop feature to add the rudder_out waveform to the existing
rudder waveforms. These waveforms should appear as shown in Figure 9.

Under close inspection, it appears that there is some irregularity near the first peak of
the waveform. After investigating this, it was found that one of the op amps in the
SPICE servo is taking a little time to recover after saturating as the motor is initially
driven. It then tracks smoothly. This could be a potential design issue and may
require further investigation.

Figure 9 - Waveforms showing system performance with SPICE-based servo controller.

Change to Full SPICE Servo


Now that we have verified that the combined SPICE/VHDL-AMS servo implementation
simulates properly, a complete SPICE sub-circuit model will be used.

Copyright Mentor Graphics Corporation 2005 165


Help on CS2_Rudder_System

1. To configure the design to run with the stand-alone SPICE sub-circuit configuration,
perform the following steps:
a) on the SERVO_SPICE_AMS block, and in the General
RMB > Edit Model Properties
tab, set the Simulation Model Type to Spice.
b) Click OK, and then save the schematic.
2. RMB > Push Language > SPICE to view the SPICE sub-circuit model.
3. Close the SPICE sub-circuit model window.
4. Re-simulate the design using the same settings as before, and verify that the
simulation results match those seen in previous design implementations.
Rudder System with Z-Domain Servo
The Z-domain Rudder System implementation is shown in Figure 10. For this im-
plementation, there are four configurations: the servo lead-lag compensator block is
implemented using the VHDL-AMS attribute, ztf (which can be simulated in the frequency
domain); and alternatively as discrete difference equations (which cannot be simulated in
the frequency domain). For these two configurations, the remainder of the servo is
composed of continuous-time control blocks.
In addition, the entire servo is implemented as difference equations in both VHDL-AMS, as
well as the C programming language. Each of these four configurations can be chosen at the
schematic level to illustrate how SystemVision can be used to develop and test systems with
software in the loop.
Design Selection/Viewing/Editing
1. Make sure the CS2_Mixed_Technology project is loaded into SystemVision.
2. From the Simulation tab, click on TestBenches > rudder_z_domain to open the
schematic.

The servo design is initially configured as a combination of continuous control block


components, and a discrete compensator (lead-lag) component.
3. RMB > Push Schematic to push into the Servo_Z_Diff block. The lead-lag compensator
block within this schematic is modeled discretely in VHDL-AMS. It can be simulated
with either of two architectures by selecting ztf or diff for Architecture in the Edit
Properties dialog box. Once selected, the given architecture will be used for
simulation.
4. RMB > Edit Model Properties on the ZTF/DIFF Lead Lag component.
5. In the General tab, verify the ztf Architecture is selected, and return to the top level
schematic (you may leave the Servo_Z_Diff schematic open).

Copyright Mentor Graphics Corporation 2005 166


Help on CS2_Rudder_System

ROT

Figure 10 - Z-Domain (difference equation) implementations of entire servo.

Simulating the Circuit


1. Return to the rudder_z_domain schematic.
2. Set the rudder_z_domain design as the active testbench, and select Simulation > Simulate
to invoke the Simulation Control window (there is also a simulation icon available on
the icon bar). The VHDL-AMS files will be compiled as necessary, and the
Simulation Control window will appear.
3. Click the OK button to run the simulation.
Viewing Results
The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use the drag-and-drop feature to drag the rudder_out waveform into the same graph
region as output waveforms from the previous two designs. These waveforms should
appear as shown in Figure 11.

Figure 11 - Waveforms of Z-domain servo implementation.

Copyright Mentor Graphics Corporation 2005 167


Help on CS2_Rudder_System

Test Additional Lead-Lag Configuration


1. Now, change from the ztf to the diff architecture in the Lead/Lag block: Push into
the Servo_Z_Diff block (or simply select its tab if you left it open from the previous
exercise).
2. Place the cursor over the ZTF/DIFF Lead Lag block, and select RMB > Edit Model
Properties.

3. Select diff from the Architecture dropdown menu in the Model Properties window.
4. Click OK to close the Model Properties window.
5. You can select RMB > Push Language > VHDL on the ZTF/DIFF Lead Lag symbol to
view the two VHDL-AMS architectures that you are choosing between.
6. Save and close the schematic, and re-run the simulation.
7. Verify that the results are similar to those given for previous simulations.
Test Full Servo VHDL-AMS and C Difference Equations
1. Next, select a software model implementation for the entire servo: From the top-
level schematic, place the cursor over the Servo_Z_Diff block, and select RMB > Edit
Model Properties.

2. Select VHDL as the Simulation Model Type in the Model Properties window.
3. In the General tab, select Diff from the Architecture dropdown menu in the Model
Properties window. The simulator will now use the Diff (all sequential VHDL-AMS
code) architecture for the next simulation.
4. Click OK to close the Model Properties window.

While on the Servo_Z_Diff block, selecting Push Language > VHDL will display the
VHDL-AMS model in which the complete servo is implemented strictly as a
sequential software algorithms. This model has two architectures, Diff and Diff_C.
5. Save the schematic, and re-run the simulation, and again compare results to previous
simulations.
6. Next, place the cursor over the Servo_Z_Diff block, and select RMB > Edit Model
Properties.

7. Select Diff_C from the Architecture dropdown menu in the Model Properties
window. The simulator will now use the Diff_C architecture for the next simulation.
The Diff_C architecture acts as a gateway between SystemVision and the actual C code
(servo_c.c).
8. Save the schematic, and re-run the simulation, and again compare results to previous
simulations. All of these implementations should yield similar results.

The actual C code source file can be found as follows from the Simulation tab in the
ProjectNavigator Tree: rudder_z_domain > Files > Auxiliary Files > servo_c.c. Select RMB >
Open on servo_c.c to view the C file contents.

Copyright Mentor Graphics Corporation 2005 168


Help on CS2_Rudder_System

The Rudder System lab exercises have illustrated multiple implementations of a servo
subsystem that yield the same simulation results. The implementations included:
All control (s-domain)
All VHDL-AMS with conserved/non-conserved models
VHDL-AMS/SPICE servo model
SPICE only servo model
Z-domain lead-lag model using VHDL-AMS ztf (for AC analysis)
Z-domain lead-lag model using difference equations
Z-domain servo model using difference equations (VHDL-AMS)
Z-domain servo model using difference equations (C)
Once again, for more detailed information on the Rudder System, please refer to the
accompanying file: vhdl-ams-book-chapter-14.pdf.

Copyright Mentor Graphics Corporation 2005 169


Help on CS3_Power_Converter

Case Study 3:
The Power Converter System

Copyright Mentor Graphics Corporation 2005


All Rights Reserved.

This document contains information that is proprietary to Mentor Graphics Corporation.


The original recipient of this document may duplicate this document in whole or in part for
internal business purposes only, provided that this entire notice appears in all copies. In
duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the proprietary information.

Copyright Mentor Graphics Corporation 2005 171


Help on CS3_Power_Converter

Copyright Mentor Graphics Corporation 2005 172


Help on CS3_Power_Converter

Case Study 3:
The Power Converter System

This help file discusses how to use SystemVision to simulate a DC-DC Switching Power
Converter. The Power Converter is part of a remote-controlled (RC) electric airplane system
(also referred to as a UAV system), which is detailed through five Case Studies in the book
The System Designers Guide to VHDL-AMS.
The RC Airplane System is illustrated in Figure 1, with the power converter highlighted by
the shaded boxes. For more detailed information on the Power Converter design, please
refer to the accompanying file: vhdl-ams-book-chapter-18.pdf. This file comprises the book
chapter which corresponds to the Power Converter system design.

Figure 1 - Power Converter in RC Airplane System.

The SystemVision project CS3_Power_Converter contains a series of test benches that


progressively expand towards a final design. This help file will sequentially walk you through
each of these designs.
tb_buckconverter testbench
Description:
The design tb_BuckConverter, shown in Figure 2, is a testbench for a basic buck converter
circuit consisting of an ideal switch, inductor, capacitor and diode. A digital clock model is
used to provide the control for the switch.

Copyright Mentor Graphics Corporation 2005 173


Help on CS3_Power_Converter

Figure 2 - tb_buckconverter schematic.

Design Selection/Viewing/Editing
Make sure the CS3_Power_Converter project is loaded into SystemVision.
From the Project tab, click on Design Roots > tb_buckconverter to open the schematic.
Simulating the circuit
1. From the menu, select Simulation > Simulate to invoke the Simulation Control window
(there is also a simulation icon available on the icon bar). If asked to make this design
the active testbench, click Yes. The VHDL-AMS files will be compiled as necessary.
2. Click the OK button to run the simulation.
Viewing Results
1. The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any
error messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the
signals vin and vout which should appear as shown in Figure 3.

Copyright Mentor Graphics Corporation 2005 174


Help on CS3_Power_Converter

Figure 3 - tb_buckconverter input and output.

As you can see, the input is 42VDC and the output is regulating to about 4.8V. Zooming in
on the output waveform will reveal the switching behavior.
tb_buckconverter_hier testbench
The design tb_BuckConverter_hier, shown in Figure 4, is a modified version of the original
tb_BuckConverter that puts the switch and diode beneath a hierarchical block (buck_sw) along
with some simple PWM control circuitry to control the frequency and duty cycle of the
switch control signal. There is also an averaged model (buck_avg) which we will use for
frequency analysis and to aid in the compensator design.

Figure 4 - tb_buckconverter_hier schematic.

Copyright Mentor Graphics Corporation 2005 175


Help on CS3_Power_Converter

Design Selection/Viewing/Editing
1. Make sure the CS3_Power_Converter project is loaded into SystemVision.
2. From the Project tab, click on Design Roots > tb_buckconverter_hier to open the
schematic.
Simulating with the switching model
1. Return to the top level schematic and from the menu, select Simulation > Simulate to
invoke the Simulation Control window (there is also a simulation icon available on
the icon bar). If asked to make this design the active testbench, click Yes. The
VHDL-AMS files will be compiled as necessary.
2. Click the OK button to run the simulation.
Viewing Results
1. The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages). Individual signals can be viewed by double-clicking with the LMB or by
using the drag-and-drop feature. You can also plot a signal from the schematic by
selecting the desired signal and using RMB > Plot Waveform. Use one of these methods
to plot the signals vin and vout which should be identical to the previous results in
Figure 3.
2. Open a new graph window (File > New), then go back to the schematic.
3. On the schematic, select the buck_sw symbol and RMB > Push schematic to open the
underlying schematic as shown in Figure 5 below:

Figure 5 - buck_sw schematic.

Copyright Mentor Graphics Corporation 2005 176


Help on CS3_Power_Converter

4. Place the cursor over the design net (wire), and select RMB > Plot Waveform to plot the
signals VSAW, CTRL, COMP_OUT, and SW_CTRL on the new graph window. Zoom as
necessary to better view the waveforms shown in Figure 6.

Figure 6 - Internal buck_sw signals.

Notice the analog sawtooth waveform (VSAW) is compared with a fixed analog reference
signal (CTRL). The comparator output is a digital signal (COMP_OUT). This signal is then
inverted to become the PWM control signal for the switch (SW_CTRL). Increasing the
reference signal will increase the duty cycle of the switch control.
5. Feel free to look at any other signals of interest. Additional waveform viewing
features are summarized below:
Multiple graph windows and workspaces can be easily created using the menus
or drag-and-drop.
Signals can be deleted using the Delete key on your keyboard, or by using the
RMB > Delete command on the signal name.

Markers can be place to view waveform coordinates.


The Measurement Tool can be used to measure various waveform characteristics.
Simulating with the Averaged model
With SystemVision it is easy to modify your design, re-simulate and compare results. To
illustrate this, lets replace the switching converter model with an averaged model.
1. Go back to the top-level schematic, select the buck_sw symbol and delete it.
2. From the menu select Add > Component and place the buck_avg.1 symbol
3. Drop this symbol into the space vacated by the old symbol.
4. Save the schematic and re-run the simulation.

Copyright Mentor Graphics Corporation 2005 177


Help on CS3_Power_Converter

Viewing Results
1. The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for error
messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the
signal vout into the previous graph containing the switching waveform (you can select
this graph window using the tabs that appear near the bottom of the Waveform
Viewer).
3. Zoom in on the graph containing vout from both runs and compare results as shown
in Figure 7.

Figure 7 Converter Output from Switching and Averaged models.

Both the switching and average model should regulate to about 4.8V, but you should have
noticed a significant increase in simulation speed when using the averaged model. This
makes the averaged model useful for parametric sweeps and compensation design.
tb_compensator testbench
The design tb_compensator is a testbench for a behavioral compensator model (comp_2p2z).
This filter contains two poles and two zeros placed at locations determined by the control-
to-output transfer curve generated using the CS3_BuckConverter design (see the document
vhdl-ams-book-chapter-18.pdf for more information).

Design selection/viewing/editing:
1. Make sure the CS3_Power_Converter project is loaded into SystemVision.
2. From the Project tab, click on Design Roots > tb_compensator to open the schematic.

Copyright Mentor Graphics Corporation 2005 178


Help on CS3_Power_Converter

Simulating the Circuit


1. From the menu, select Simulation > Simulate to invoke the Simulation Control window
(there is also a simulation icon available on the icon bar). If asked to make this design
the active testbench, click Yes. The VHDL-AMS files will be compiled as necessary.
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Frequency Domain Analysis and use these
settings:
Freq Start: 1
Freq Stop: 100meg
The Results tab allows you to select the signals for viewing. The default selection
is TopLevel Waveforms which will save all signals at the highest level of
hierarchy. Since this is a small design, All Signals was selected for convenience.
You can also choose Selected Waveforms and click on the browse button () to
select individual signals.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation.
Viewing Results
1. The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for error
messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the
signal vout. Note both the magnitude in dB and the phase will be plotted. The results
are shown in Figure 8.

Copyright Mentor Graphics Corporation 2005 179


Help on CS3_Power_Converter

Figure 8 - tb_compensator frequency response.

The locations of the poles and zeros have been placed to compensate for corresponding
poles and zeros measured from the control-to-output frequency response of the buck
converter simulated below.
The waveforms can be placed in the same graph region by selecting and dragging a
waveform name from the signal pane to the desired graph region.
CS3_buckconverter testbench
The design CS3_BuckConverter, shown in Figure 9, is a more complete buck converter
example that includes compensation in the feedback loop. Some additional models have
been added to allow the feedback loop to be broken (sw_LoopCtrl) and to enable/disable the
load (pwl_load). With this circuit, the control-to-output frequency response transfer curve can
be generated to assist in designing the compensator, along with time-domain simulation
results to test the line and load regulation of the closed-loop system. All simulations will be
done using the averaged model (buck_avg), and a behavioral model of the compensator
(comp_2p2z).

Figure 9 - CS3_BuckConverter schematic.

Part 1: Generating the Control-to-output transfer curve


The control-to-output transfer curve is generated using the frequency analysis, and the
resulting bode plot can be used to determine the locations of the poles and zeros needed for

Copyright Mentor Graphics Corporation 2005 180


Help on CS3_Power_Converter

the compensation design. To generate this plot, we need to break the loop and disable the
load prior to running the simulation.
Design selection/viewing/editing:
1. Make sure the CS3_Power_Converter project is loaded into SystemVision.
2. From the Project tab, click on Design Roots > CS3_BuckConverter to open the
schematic.
Break the loop:
1. Select the two-pole switch (sw2) and select RMB > Edit Model Properties.
2. From the Parameters tab, set the sw_state property to 2, if necessary. This will break
the loop and insert the DC voltage source connected to p2.
Disable the Load:
1. Select the Load symbol and select RMB > Edit Model Properties.
2. From the Parameters tab, set the load_enable property to no, if necessary. This will
remove the load from the circuit.
Simulate the Design:
1. From the menu select Simulation > Simulate to invoke the Simulation Control window
(there is also a Simulation icon available on the icon bar). If asked to make this
design the active testbench, click Yes. VHDL-AMS files will be compiled as
necessary.
The Simulation tab is for the basic settings and to enable/disable the desired
analyses.
If necessary, uncheck the Time-Domain Analysis Enable checkbox.
If necessary, enable the Frequency Analysis and use these settings:
Freq Start: 1
Freq Stop: 100meg
The Results tab allows you to select the signals for viewing. The default selection
is TopLevel Waveforms which will save all signals at the highest level of
hierarchy. Use the down arrow button for other choices.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is for advanced simulation settings.
2. Click OK button to run the simulation.
Viewing Results:
1. The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for error
messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the

Copyright Mentor Graphics Corporation 2005 181


Help on CS3_Power_Converter

signal vout to view the magnitude and phase of the control-to-output response as
shown in Figure 10.

Figure 10 - Control-to-output frequency response.

3. From the menu, select Cursor > Add to add a cursor to the graph.
4. Verify the location of the double-pole caused by the LC filter.
( fp( LC ) = 1 /(2 LC ) = 806 Hz )
Part 2: Closed-loop Time-Domain Simulation with Load/Line Regulation
The control-to-output curve contains useful information for designing the compensator.
Here we will close the loop and use a high-level model for the compensation loop filter (see
the tb_compensator design above to verify its operation). The load will be re-enabled and a
Time-Domain analysis will be run to verify it the closed-loop operation. The pwl_load model
can be used to change the load resistance to a different value at a certain instant in time. This
will allow us to see how the closed-loop system responds to sudden changes in load
conditions.
Close the loop:
1. Select the two-pole switch (sw2) and select RMB > Edit Model Properties.
2. From the Parameters tab, set the sw_state property to 1. This will close the loop and
connect the output of the compensator block to the ctrl input of the buck_avg model.
Enable the Load:
1. Select the Load symbol and select RMB > Edit Model Properties.
2. From the Parameters tab, set the load_enable property to yes. This will enable the
load in the circuit.
Simulate the Design:
1. From the menu select Simulation > Simulate to invoke the Simulation Control window
(there is also a Simulation icon available on the icon bar). If asked to make this

Copyright Mentor Graphics Corporation 2005 182


Help on CS3_Power_Converter

design the active testbench, click Yes. VHDL-AMS files will be compiled as
necessary.
The Simulation tab is for the basic settings and to enable/disable the desired
analyses.
Enable the Time-domain Analysis and set End Time to 70ms.
Disable the Frequency-domain Analysis.
The Results tab allows you to select the signals for viewing. The default selection
is TopLevel Waveforms which will save all signals at the highest level of
hierarchy. Use the down arrow button for other choices.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is for advanced simulation settings.
2. Click the OK button to run the simulation.
Viewing Results:
1. The simulation results will automatically be loaded into the Waveform Viewer upon
completion of a successful simulation (if not, look in the Output Window for error
messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform.
3. Use one of these methods to plot the signal vout (from the Time-Domain Analysis)
and verify that the voltage output regulates to 4.8V after a sudden change in load
conditions at 5ms and 30ms. Also, verify the output regulates to 4.8V after a sudden
drop in the input voltage from 42V to 30V at 50ms. The result is shown in Figure
11.

Figure 11 - Load and Line Regulation.

Copyright Mentor Graphics Corporation 2005 183


Help on CS4_Communications_System

Case Study 4:
The Communications System

Copyright Mentor Graphics Corporation 2005


All Rights Reserved.

This document contains information that is proprietary to Mentor Graphics Corporation.


The original recipient of this document may duplicate this document in whole or in part for
internal business purposes only, provided that this entire notice appears in all copies. In
duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the proprietary information.

Copyright Mentor Graphics Corporation 2005 185


Help on CS4_Communications_System

Copyright Mentor Graphics Corporation 2005 186


Help on CS4_Communications_System

Case Study 4:
The Communication System

This help file discusses how to use SystemVision to simulate a simple Communications
System. The Communications System is part of a remote-controlled (RC) electric airplane
system (also referred to as a UAV system), which is detailed through five Case Studies in the
book The System Designers Guide to VHDL-AMS.
The RC Airplane System is illustrated in Figure 1, with the Communications System
highlighted by the shaded boxes. For more detailed information on the Communications
System design, please refer to the accompanying file: vhdl-ams-book-chapter-23.pdf. This file
comprises the book chapter which corresponds to the Communications System design.

Figure 1 Communications Systems in RC Airplane System.

The SystemVision project CS4_Communications_System contains a several test benches that


will be simulated in the steps below.
tb_bfsk
Description:
The design tb_bfsk shown in Figure 2 is a simple testbench for verifying the functionality of
the Binary Shift Keying (BFSK) Modulator. The MeasFreq model continually monitors the
BFSK output, calculates the frequency, and outputs it as a signal.

Copyright Mentor Graphics Corporation 2005 187


Help on CS4_Communications_System

Figure 2 - tb_bfsk schematic.

Design Selection/Viewing/Editing
1. Make sure the CS4_Communications_System project is loaded into SystemVision.
2. From the Project tab, click on Design Roots > tb_bfsk to open the schematic.
Simulation
1. From the menu, select Simulation > Simulate to invoke the Simulation Control window
(there is also a simulation icon available on the icon bar). If asked to make this design
the active testbench, click Yes. The VHDL-AMS files will be compiled as necessary.
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to
800us.
The Results tab allows you to select the signals for viewing. The default selection
is TopLevel Waveforms which will save all signals at the highest level of
hierarchy. Since this is a small design, All Signals was selected for convenience.
You can also choose Selected Waveforms and click on the browse button () to
select individual signals.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation.
Viewing Results
1. The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any
error messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the
signals bitstream, bfsk_out and f_bfsk_out which should appear as shown in Figure 3.

Copyright Mentor Graphics Corporation 2005 188


Help on CS4_Communications_System

Figure 3 - tb_bfsk input and output.

Note that the f_bfsk_out waveform will need to be zoomed in the y-axis to keep from getting
swamped out be the DC offset.
The graph markers on the measured output frequency signal show that the binary frequency
shifting operation is toggling the frequency between 455kHz and 460kHz as desired.
3. Look at any other signals of interest. Additional Waveform Viewer features are given
below:
Multiple graph windows and workspaces can be easily created using the menus
or drag-and-drop.
Markers can be placed to view the X-Y coordinates of any point in the
waveform.
Signals can be deleted using the Delete key on your keyboard, or by using the
RMB > Delete command on the signal name.
The Measurement tool can be used to extract information from the waveforms.
tb_CommSys_Det
The design tb_CommSys_det, shown in Figure 4, is a non-coherent detector topology
commonly used to detect (demodulate) BFSK signals and recover the original unmodulated
baseband data.

Copyright Mentor Graphics Corporation 2005 189


Help on CS4_Communications_System

Figure 4 - tb_CommSys_det schematic.

Design Selection/Viewing/Editing
Make sure the CS4_Communications_System project is loaded into SystemVision.
From the Project tab, click on Design Roots > tb_Commsys_det to open the schematic.
Simulate the Design
1. Return to the top level schematic and from the menu, select Simulation > Simulate to
invoke the Simulation Control window (there is also a simulation icon available on
the icon bar). If asked to make this design the active testbench, click Yes. The
VHDL-AMS files will be compiled as necessary.
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to
800us.
The Results tab allows you to select the signals for viewing. The default selection
is TopLevel Waveforms which will save all signals at the highest level of
hierarchy. Since this is a small design, All Signals was selected for convenience.
You can also choose Selected Waveforms and click on the browse button () to
select individual signals.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation (the Output Window will display the
simulation progress and any error messages that may be issued).
Viewing Results
1. The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any
error messages).
2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the
input (bitstream), lowpass filter output (lpf_out) and recovered digital baseband signal
(baseband) as shown in Figure 5.

Copyright Mentor Graphics Corporation 2005 190


Help on CS4_Communications_System

Figure 5 tb_CommSys_det simulation results.

Note the original input bitstream is successfully recovered with about 14us of delay.
3. Look at any other signals of interest. Additional Waveform Viewer features are given
below:
Multiple graph windows and workspaces can be easily created using the menus
or drag-and-drop.
Markers can be placed to view the X-Y coordinates of any point on the
waveform.
Signals can be deleted using the Delete key on your keyboard, or by using the
RMB > Delete command on the signal name.

The Measurement Tool can be used to extract information from the waveforms.
tb_CommSys_PLL
The design tb_CommSys_PLL, shown in Figure 6 is an alternate detector topology that utilizes
a Phase Locked Loop circuit used to detect (demodulate) BFSK signals to recover the
original unmodulated baseband data.

Copyright Mentor Graphics Corporation 2005 191


Help on CS4_Communications_System

Figure 6 - tb_CommSys_PLL schematic.

Design selection/viewing/editing:
1. Make sure the CS4_Communications_System project is loaded into SystemVision.
2. From the Project tab, click on Design Roots > tb_CommSys_PLL to open the schematic.
Simulate the Design
1. Return to the top level schematic and from the menu, select Simulation > Simulate to
invoke the Simulation Control window (there is also a simulation icon available on
the icon bar). If asked to make this design the active testbench, click Yes. The
VHDL-AMS files will be compiled as necessary.
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to
800us.
The Results tab allows you to select the signals for viewing. The default selection
is TopLevel Waveforms which will save all signals at the highest level of
hierarchy. Since this is a small design, All Signals was selected for convenience.
You can also choose Selected Waveforms and click on the browse button () to
select individual signals.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation.
Viewing Results
1. The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for error
messages).

Copyright Mentor Graphics Corporation 2005 192


Help on CS4_Communications_System

2. Individual signals can be viewed by double-clicking with the LMB or by using the
drag-and-drop feature. You can also plot a signal from the schematic by selecting the
desired signal and using RMB > Plot Waveform. Use one of these methods to plot the
input (bitstream), lowpass filter output (lpf_out) and recovered digital baseband signal
(baseband) as shown in Figure 7.

Figure 7 - tb_CommSys_PLL simulation results.

Note the original input bitstream is successfully recovered with about 8us of delay.
3. Look at any other signals of interest. Additional Waveform Viewer features are given
below:
Multiple graph windows and workspaces can be easily created using the menus
or drag-and-drop.
Markers can be placed to view the X-Y coordinates of any point an the
waveform.
Signals can be deleted using the Delete key on your keyboard, or by using the
RMB > Delete command on the signal name.

The Measurement tool can be used to extract information from the waveforms.

Copyright Mentor Graphics Corporation 2005 193


Help on CS5_RC_Airplane

Case Study 5:
The RC Airplane System

Control Stick Analog to Bitstream RF Transmit/Receive

Motor/Propeller
Throttle Amp
Bitstream to Pulse-Width Pulse-Width to Analog
Amp

Rudder Servo & Amp

s+a
s+b
+ Buck Converter
Battery DC Motor/Rudder
(42 V) DC Assembly

Copyright Mentor Graphics Corporation 2005


All Rights Reserved.

This document contains information that is proprietary to Mentor Graphics Corporation.


The original recipient of this document may duplicate this document in whole or in part for
internal business purposes only, provided that this entire notice appears in all copies. In
duplicating any part of this document, the recipient agrees to make every reasonable effort to
prevent the unauthorized use and distribution of the proprietary information.

Copyright Mentor Graphics Corporation 2005 195


Help on CS5_RC_Airplane

Copyright Mentor Graphics Corporation 2005 196


Help on CS5_RC_Airplane

Case Study 5:
The RC Airplane System

This help file discusses how to use SystemVision to simulate various remote controlled (RC)
electric airplane system designs. The individual subsystems for the RC Airplane System (also
referred to as a UAV system) are detailed through five Case Studies in the book The System
Designers Guide to VHDL-AMS.
The RC Airplane System is shown in Figure 1. For more detailed information on the RC
Airplane System, please refer to the accompanying file: vhdl-ams-book-chapter-26.pdf. This file
comprises the book chapter which corresponds to the complete RC Airplane System design.
Control Stick Analog to Bitstream RF Transmit/Receive

Motor/Propeller
Throttle Amp
Bitstream to Pulse-Width Pulse-Width to Analog
Amp

Rudder Servo & Amp

s+a
s+b
+ Buck Converter
Battery DC Motor/Rudder
(42 V) DC Assembly

Figure 1 - Complete RC Airplane System.

There are three implementations of the RC Airplane System discussed in this help file:
Airplane_CC_Rudder; Airplane_Prop; and Airplane_HCL. These are summarized below.

RC Airplane System Implementations


Rudder System Implementation Approach
Airplane_CC_Rudder System implementation that combines the
Airplane Controller (C&C System) and the
Rudder System.
Airplane_Prop Test bench for the airplane propeller
system. This includes a pulse-width
modulated (PWM) controller, with a motor
and propeller model.
Airplane_HCL Full Airplane Controller and Rudder
System configured as part of a closed loop
with a human operator modeled in the
loop.

Airplane Command & Controller with Rudder System

Copyright Mentor Graphics Corporation 2005 197


Help on CS5_RC_Airplane

Design Selection/Viewing/Editing
1. Make sure the CS5_RC_Airplane_System project is loaded into SystemVision.
2. From the Simulation tab (in the ProjectNavigator Tree), click on TestBenches >
airplane_cc_rudder to open the schematic. A schematic similar to that illustrated in
Figure 2 should appear.

The purpose of the Airplane CC Rudder System is to send digitized versions of the
input analog commands (which issue from a hand-held joystick controller), through
an RF transmitter/receiver pair, and properly decode the signals and apply them to
the complete Rudder System. In this way, the entire link from analog command to
physical rudder movement can be analyzed.
throttle_cmdDigitize/Encode RF Tx and Rx Decode/PW PW/Analog To
Prop

Amp PLL
rudder_cmd PW/Analog To
Rudder
f1 f2

rudder_ana

Servo/Amplifier DC Motor Translational Rudder


Low-Pass Gear Box
Linkage
w1 w2 + s+a
k
(s + w1)(s + w2)
s+b rudder_out
Control Control
Horn Horn

Mechanical
Potentiometer Stop

Figure 2 - Airplane Command & Control with Rudder System.

Simulating the System


1. Set airplane_cc_rudder as the active test bench: RMB > Set As Active Testbench, and select
Simulation > Simulate to invoke the Simulation Control window (there is also a
simulation icon available on the icon bar). The VHDL-AMS files will be compiled as
necessary, and the Simulation Control window will appear. This window contains
four tabs:
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to 2
sec.
The Results tab allows users to select signals for viewing. The default selection is
TopLevel Waveforms which will save all signals at the highest level of hierarchy.
Users can also choose Selected Waveforms and click on the browse button ()
to select individual signals, or All Signals, which makes every available signal in
the design available for viewing.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).

Copyright Mentor Graphics Corporation 2005 198


Help on CS5_RC_Airplane

2. Click the OK button to run the simulation.


Viewing Results
The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the rudder_cmd, rudder_ana and rudder_out
waveforms. It will be easier to compare the waveforms if they are placed into the
same graph region. The waveforms should look similar to those shown in Figure 3.

Figure 3 - C&C with Rudder System input/output waveforms.

An illustrated, the rudder_cmd waveform is analog, and is issued from the joystick; the
rudder_ana waveform is the reconstructed rudder command after being received digitally on
the airplane and re-converted into analog form; the rudder_out waveform represents the actual
rotational rudder displacement.
2. Explore other waveforms of interest.
Airplane Propeller System
Design Selection/Viewing/Editing
1. Make sure the CS5_RC_Airplane_System project is loaded into SystemVision.
2. From the Simulation tab (in the ProjectNavigator Tree), click on TestBenches >
airplane_prop to open the schematic. The schematic illustrated in Figure 4 should
appear.
The purpose of the Airplane Propeller System is to verify that the propeller speed and
torque specifications for the system are satisfied. This system consists of an ideal sine wave
stimulus, which feeds into a pulse-width modulator (PWM), which in turn controls the
amount of energy delivered from the 42V power supply to the propeller motor.

Copyright Mentor Graphics Corporation 2005 199


Help on CS5_RC_Airplane

PWM

Switch
Motor Propeller

Figure 4 - Airplane Propeller System.

Simulating the System


1. Set airplane_prop as the active test bench: RMB > Set As Active Testbench, and select
Simulation > Simulate to invoke the Simulation Control window (there is also a
simulation icon available on the icon bar). The VHDL-AMS files will be compiled as
necessary, and the Simulation Control window will appear. This window contains
four tabs:
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to 1
sec.
The Results tab allows users to select signals for viewing. The default selection is
TopLevel Waveforms which will save all signals at the highest level of hierarchy.
Users can also choose Selected Waveforms and click on the browse button ()
to select individual signals, or All Signals, which makes every available signal in
the design available for viewing.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation. Note that due to the switching of the
PWM, this simulation will take significantly longer to run than previous simulations.
Simulation progress is displayed in the lower-left corner of the main SystemVision
window.
Viewing Results
The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the prop_amp_in and prop waveforms. It will be
easier to compare the waveforms if they are placed into the same graph region.
These waveforms should appear as shown in Figure 5.

Copyright Mentor Graphics Corporation 2005 200


Help on CS5_RC_Airplane

Figure 5 - Waveforms for Airplane Propeller System.

As illustrated, the propeller output follows the command somewhat, but not completely.
This is because the propeller drive circuit is uni-directional, and relies on the propeller drag
to slow it down when so commanded. This is deemed acceptable in this system since
standard airplane usage would not require the propeller to be shut down instantly.
Users are also encouraged look at the propeller torque and PWM output waveforms as well.
Note that when looking at high frequency switching signals, it is best to reduce the viewable
time range in the waveform viewer (either by double-clicking on the time axis and typing in
values manually, or by zooming in on a reduced range).
Airplane with Human in the Loop
Design Selection/Viewing/Editing
1. Make sure the CS5_RC_Airplane_System project is loaded into SystemVision.
2. From the Simulation tab (in the ProjectNavigator Tree), click on TestBenches >
airplane_HCL to open the schematic. A schematic similar to that illustrated in Figure 6
should appear.

This new system includes the Airplane Controller (C&C) and Rudder System
designs, along with the human operator in the loop. This system models the
interaction between the RC Airplane itself, and the person controlling it. Wind
perturbations are also applied from within the plane model, in order to see how well
the system will respond when the RC operator attempts to adjust for them.

Copyright Mentor Graphics Corporation 2005 201


Help on CS5_RC_Airplane

Digitize/Encode RF Tx and Rx Decode/PW PW/Analog

Amp PLL
PW/Analog

f1 f2

To Rudder
To Prop

DC Motor Propellor
Low-Pass
pwr_in
w 1 w2
k speed_cmd sw_out
(s + w1)(s + w2)

Low-Pass Power Amp

Buck Converter +
DC
DC
Battery
4.8 V DC 42 V

Servo/Amplifier DC Motor Translational Rudder


Low-Pass Gear Box
Linkage
w1 w2 + s+a
k
(s + w1)(s + w2) s+b

Control Control
Horn Horn

Mechanical
Potentiometer Stop Rot2V
Human
Controller k

Visual Feedback

Figure 6 - Command and Controller with Rudder System and Human Control Loop.

Simulating the System


1. Set airplane_hcl as the active test bench: RMB > Set As Active Testbench, and select
Simulation > Simulate to invoke the Simulation Control window (there is also a
simulation icon available on the icon bar). The VHDL-AMS files will be compiled as
necessary, and the Simulation Control window will appear. This window contains
four tabs:
The Simulations tab is for the basic settings and to enable/disable the desired
analyses. If necessary, enable the Time-Domain Analysis and set End Time to 1.2
sec.
The Results tab allows users to select signals for viewing. The default selection is
TopLevel Waveforms which will save all signals at the highest level of hierarchy.
Users can also choose Selected Waveforms and click on the browse button ()
to select individual signals, or All Signals, which makes every available signal in
the design available for viewing.
The Multi-Run tab is for performing parametric variations.
The Advanced tab is used for advanced simulation settings (normally not
required).
2. Click the OK button to run the simulation.
Viewing Results

Copyright Mentor Graphics Corporation 2005 202


Help on CS5_RC_Airplane

The simulation results will automatically be loaded into the waveform viewer upon
completion of a successful simulation (if not, look in the Output Window for any error
messages).
Individual waveforms can be viewed by double-clicking the left-mouse button (LMB) or by
using the drag-and-drop feature. Waveforms can also be displayed from the schematic by
selecting the desired signal and using RMB > Plot Waveform.
1. Use one of these methods to plot the plane1\wind_neg and rudder_out waveforms. It
will be easier to compare the waveforms if they are placed into the same graph
region.
2. Plot the plane1\flight_deviation waveform on a separate graph region. These waveforms
should appear as shown in Figure 7.

Figure 7 - Waveforms showing human response due to deviations caused by crosswinds.

As shown in the figure, the wind_neg waveform represents a crosswind profile, and the
rudder_out waveform represents how well the RC operator responds to the resulting
unwanted heading change. The flight_deviation waveform represents the actual deviation from
the original heading (0 rudder angle), which results from the crosswind.
3. Look at any other signals of interest.
4. Again, for more detailed information on the RC Airplane System, please refer to the
accompanying file: vhdl-ams-book-chapter-26.pdf.

Copyright Mentor Graphics Corporation 2005 203

Вам также может понравиться