system modelling using open modelica - cal polyfowen/et401/firstorderstepresponse.pdfthe resulting...
TRANSCRIPT
Create a model of a first-order system in Modelica…
System modelling using Open ModelicaMaine Maritime Academy – ET401, Automation and Control
Fall semester 2018
by Prof Frank Owen, PhD, PE
…then subject it to a step input…
…to get a first-order step response
(this will be used later to tune a PID controller for this system)
First you need to download and install the open-source modelling package OMEdit (Open-source Modelica GUI), available for both the Windows and iOS environments
First order
Second order
New model
Create a first-order model
You can name thiswhatever you want
First order
Drag the FirstOrder out into the workspace…
…now get a step input
Set thestartTime to 1
Hook the two together withyour mouse: click and dragaway from the output arrowon step1; then let loose the
mouse; then click on theinput arrow to firstOrder1
Set the steady-stategain to 200 °F
Set the time constantto 75 seconds
On the buttonsacross the top, this is„ Simulation setup“
Set the simulationstop time to 400
seconds
When you press this button, you will get a prompt for a name to save thistoo. Enter a meaningful name, then
the simlation will start.
If all goes well (you did
everything right), you will get a
success report like this…
…and an output window like this.
To see the step response, you will need to check y
here; y is the output fromthe firstOrder block
You can go back and forthbetween the model and theresult (Plotting) using these
buttons in the lower right cornerof OMEdit
See more about first- and second-order step responses in Chapter 4 of Control Systems Engineering: A Practical Approach
Two identical DC motors, mechanically coupled together. Step input of 5 VDC applied to one motor, voltage out of second motor captured on an oscilloscope.
The resulting step response is very noisy. It could be filtered, but the first-order nature of the response is evident, even with the noise.
This is the extracted data from the noise
curve at right.
Can you get the transfer function for this motor/generator set?
Homework problem 1
Create a simulation where the time constant is 8 seconds and the gain is -5
Show the time constant graphically on the graph Use electronic cut-and-paste into Word
Use the Word call-outs to point this out
Show the gain using the Word call-outs
How long does it take the system to reach its new equilibrium after the step? Show this on your diagram.
Homework problem 2
Create a simulation of a second-order, underdamped system with: A natural frequency of 1 Hz
A steady-state gain of 8
A 20% overshoot
A step response with a size of 2, triggered at t = 1 sec
Show in Word with call-outs: The 20%OS
The (approximate) period of 1 second
The peak time
Homework problem 3
Create a simulation of a PID controller with KP = 10
KI = 1
KD = 2
A step response with a size of 2, triggered at t = 1 sec
Show the response to a unit step input, triggered at 1 sec, running for 11 sec with: The effect of KP
The effect of KI
The effect of KD (the “derivative kick”)
Acknowledgement:
My thanks to the Università degli studi di Bergamo, Laboratorio di Automatica, whose generous support allowed me to find Modelica and then develop my skills in system modelling using that software