Kylowave Control Systems Platform Model-Based Design ...rhabash/ELG4156Invited.pdf · Kylowave...
Transcript of Kylowave Control Systems Platform Model-Based Design ...rhabash/ELG4156Invited.pdf · Kylowave...
Kylowave Control Systems Platform
Model-Based Design Process:
A Linear Systems Course Perspective
By Julio Pimentel
University of Ottawa
November 9th, 2015
Objectives & Takeaways
Present a quick summary of model-based
design (MBD) process
Discuss why linear systems course is
important to MBD
Present a quick introduction to Kylowave
Teaching Platforms and K-CSP (Kylowave
Control Systems Teaching Platform)
Demonstration:
An embedded motor controller
A real-time virtual model with motor emulation
What is the problem?
Today, there is a growing trend for the automotive, aerospace, mechatronics and energy industry, among others, to blend: Mechanical
electro-mechanics
digital controllers
power electronics
communication and software
Coordinating this multidisciplinary and disparate engineering disciplines involved on a single development process presents a set of hard demanding challenges for technology companies to overcome [Aberdeen08:mbd].
Traditional Design Process
Also known as Text-Based Design Process
Modeling and simulation may be used but separated on each subsystem
Difficult to find problems early in the development cycle
Specifications
Design and Implementation
Integration and Test
Control Design
Control Algorithms
C/C++
Embedded Software
MCAD/MCAE
Mechanical Components
EDA
Electronic Components
Research Requirements
Model-Based Design Process
Modeling and Simulation is at the heart of the MBD methodology
Verification and validation is done continuously through all phases
Much easier to find bugs at the very beginning of the development cycle
C/C++
Design
Real-Time Testing
ContinuousVerification &
Validation
Requirements
Hardware
Environment Models
Timing and Control Logic
Electrical Mechanical
Algorithms
VHDL/Verilog CAD
Rapid PrototypingHardware-In-The-Loop
Test Environments
MBD V-diagram
ProjectInitiation
PreliminairyEngineering
Plans, specs and estimates
ConstructionProject
CloseoutOperations and
maintenance
Life cycle time line
Concept of operations
System Requirements
Project Architecture (High Level)
Component Level Design (Detailed )
Software CodingHardware Fabrication
UnitTesting
Subsystem Integration & Verification
System Integration & Verification
System Validation
Operations & Maintenance
Systems Engineering Management
Plan framework
Decision Gate
Example of companies providing
SW and HW tools for MBD Matlab from Mathworks
SytemVision from Mentor Graphics
Labview from National Instruments
Rockwell Collins
Esterel Technologies
Xilinx
Altera
Example of companies adopting
MBD as their design flow Boeing
Airbus
General Motors
FORD
Discussion Panel
Why is linear system modeling and
simulation important to model-based
design process?
Kylowave laboratory products
ONE platform – ALL your courses
K-CSP high-level architecture
K-CSP – Kylowave Control Systems Teaching
Platform
A new way to provide a teaching platform for
control systems courses
Disabled Lead-Lag #1
Lead-Lag#1
Disabled Lead-Lag #2
Lead-Lag#2
Disabled Controller
InternalDigital
Controller
ExternalController
PowerDrive
DC Motor
Reference
Feedbackopen-loop (1)
Disabled low-pass filter
FeedbackLow-pass
Filter
K L2 (S t Z2 + 1)(S t P2 + 1)
K e(S t M + 1)
K L1 (S t Z1 + 1)(S t P1 + 1)
K F(S + w F)
Controlleropen-loop (2)
SpeedSpeed error
PositionPosition error
Note: 1) Signals in red can be visualized on the GUI waveform window 2) Signals in green are internal signals and can not be visualized in the waveform window 3) The position gain maps +/- 2π radians to +/- 5V (V = gain * 0.79577 Angle) 4) Print a WARNING if one of the signals crosses/hit one of the saturation limits
K-CSP High-Level Architecture
K-CSP Kylowave Control Systems
Teaching Platform
K-CSP benefits to undergrad
students Useful in courses from introductory to
senior levels
Develop experience in analog and digital PID, PI-PD, Lead-Lag controllers
Develop better link between theoretic knowledge and practical hands-on experience
Provides for more practical hands-on skill development for what the engineer will face in industry
K-CSP Graphical User Interface
Used to configure the experiment
Procedure
1. Upload the embedded sketch to K-CSP
2. Connect K-CSP to the proper USB port
3. Setup the data file destination path
4. Setup the experiment runtime
5. Setup the sampling time to 50 ms
6. Setup the visualization time to 50 ms
7. Setup signal generator to PULSE GENERATOR (Initial Value = -3.0V, Amplitude = 6.0V, Period = 30s, Duty cycle = 50%, Delay = 0.0ms)
8. Assign Channel 0 and Channel 1 to “Raw speed” and “Raw speed error” respectively
9. Assign Graph3 and Graph 4 to “Reference in mV” and “Control Output in mV” respectively
10. Click on “START” to start the experiment or “STOP” to abort it
K-CSP GUI and Waveform Viewer
Configuration: Embedded controller PI-
PD position control
K-CSP GUI and Waveform Viewer
Configuration: Real-time simulator for
PID speed control
System level architecture of modern
speed controllers
PI Controller
PWM Modulator
Actuator Process
Sampling TimeClock
Generation
Feedback Sensor System
DC-DC
ConverterDC Motor
Optical Encoder
First-Order Low Pass
Filter
Shaft
Speed
Reference
Speed
Measured
Speed
Filtered
Speed
+
-
Error
w=dq/dtq
Km
1 + s tm
1
sKi
s
Kp
wref
VcontVerr
Kv
1 + s tv
Low-Pass Filter
DC Motor Model
PI Controller+
+
+
-
Vcont= (Kp + Ki/s) * Verr
Experiment Connection Diagram
K-ECS
Inv3Ph_A
Digital_7
Reserved
Digital_6Digital Control
Pin14
K-MCK
Inv3Ph_B
DG
ND
DG
ND
Three-Phase
Inverter pin2 DC_Mot-
OptEnc_X Digital Control
Pin9
OptEnc_A
OptEnc_BDigital Control pin29
pin30
ADCVin_0
An
alo
gIO
_1
Exte
rnal
sig
nal
gen
erat
or
(0 t
o +
5V
)
Inte
rnal
1kΩ
Po
ten
tio
met
er
An
alo
g
Ch
ann
el 1
Analog
ControllerController Output
Three-Phase
Inverter pin1
Digital Control
pin13
Digital Control
Pin7
PotV_0
Current Sensors Pin1
VSU
PP
LY
Vin = -5V to +5VVout = -15V to +15V
An
alo
g
Ch
ann
el 0
DACFltSym_1 DACFltSym_0
DACPWM_0DACPWM_0
DACPWM_1
Analog Connector
pin29
Analog Connector
pin30
VSU
PP
LYThree-Phase Inverter
Pin5 pin6DC Motor pin3
DC_Mot+DC Motor pin2
Digital Control
Pin10
Digital Control
Pin11
Digital Control
Pin30
DACPWM_1 Digital Control
Pin29
Current Sensors
Pin1RESERVED
Pin7
Analog Connector
pin33
Analog Connector
pin34
Analog Connector
pin24
MainFeedback
(Error Signal 1)
Three-Phase
Inverter pin4
Vin = -5V to +5V
AuxFeedbak (Error
Signal 0)
Error 0 (digital)
Error 1 (digital)
Analog Connector
Pin18
Analog Connector
Pin28
Controller output (sensored)
Analog Connector
pin6
AG
ND
Analog Connector
Pin6
AGND
SenseV_S0
Analog Connector
Pin5
AGND
INOUT
Analog PI controller with OpAmps
Analog Controller circuit
The Op. Amp. component is OPA4171 from
TI. All pin numbers are w.r.t. K-MCK analog
connector
+
-
VIN
R2=240kΩ
R1=220kΩC1=0.67µF
+15V
AGND
4
11
2
3
1
From Pin 33
-15V
-
+
R3=10kΩ
R4=10kΩ
To Pin 286
5
4
11
+15V
-15V
AGND
To Pin 5
To Pin 5
C2=1nF
7
Procedure to run the analog
controller experiment Load KcspAnalog sketch to K-CSP
Setup the PI controller power supply voltage to +/- 15V
Configure the GUI as explained in a previous slide
Setup run-time to 60 s and run the experiment
Use K-CSP to save ALL IMPORTANT experimental data as well as the waveforms
Repeat the procedure with power supply voltage set to +/- 5V. What is the difference? Explain.
What do we need to modify in the system to obtain a different closed-loop response? Is it easy to do it?
Procedure to run the digital
controller experiment Load KcspDigital sketch to K-CSP
Configure the GUI as explained in a previous slide
Setup run-time to 60 s and run the experiment
Use K-CSP to save ALL IMPORTANT experimental data as well as the waveforms
Do we need an external power supply? What do we need to modify in the system to obtain a different closed-loop response? Is it easy to do it?
In the sketch, set Ki to zero and increase Kp until the response approaches oscillatory behavior. Then, increase Ki gain to reduce the overshoot
What is the physical effect of Kp and Ki? Explain.
Feedback from the students
They liked to use K-CSP because it is compact, beautiful, flexible and allow them to experience realistic (non-ideal) behavior
The demo helped them to better link theory to practical experience by allowing them to: ”feel” the effects of the controller (Kp, Ki, controller counter-act
reaction and loop delay)
easily try other scenarios on their won that were not part of the lab manual but that triggered their curiosity
Add these additional experiments In open and closed –loop - Put pressure on the wheel to observe
the speed slow down, compensation by the controller and quickly release the pressure to observe the effect of the loop delay in overshooting the closed-loop response
Students suggested to fast finger tap the wheel to simulate load disturbance noise to understand the controller robustness to noise
Design an experiment to help them to visualize the effect of the loop delay in limiting the controller from achieving “zero error” but oscillating around it (tracking the reference)
Feedback from the professor
If the Lab has space limitation, the setup
with K-MCK on top of K-ECS plus
Kylowave’s expansion connector is a
clean, compact and beautiful solution
If the Lab can afford more space, a setup
with K-ECS besides K-MCK would
provide additional visual feedback to the
students by allowing them to see what is
happening inside the two products
Quiz questions asked during the
presentation
With Ki = 0, what is the steady-state error? Can it ever be zero? And if Ki ≠ 0?
What happens to the motor speed when we put pressure on the wheel? Why?
And what happens when we release pressure from the wheel? Why?
Name three realistic effects not usually accounted for in ideal simulations? And explain what is their effect on the controller response
In layman’s terms, what is the controller loop delay?
Q&A
Thank you
Literature:
[1]
[2]
[3]
Contact:
Kylowave Inc.
www.kylowave.com