Professional Documents
Culture Documents
12 - Akp
12 - Akp
Systems
Dhirendra Singh
dhirendra.singh@mathworks.in Vivek Raju
Application Engineer Application Engineer
Determine the sizing of the electrical components like motors and optimize the parameters
Develop appropriate control logic (Field oriented control and event based control logic)
Perform real-time simulation for rapid control prototyping and hardware-in-the-loop simulation
2
Demo
Electrically Assisted Power Steering
3
Challenge 1:
4
Introduction to Simscape
5
Develop Complex Multidomain Systems
Inputs and outputs Physical connections
Software components Simultaneous equations
Physical A B
Hardware
+- PID
T P T
S1
if (..)
x = … S3 S2
else Software &
x =
Algorithms
6
Challenge 2:
7
Modeling Kinematics & Mechanisms of Mechanical design
Primary uses
– System-level analysis of
mechanical and multidomain systems
– Control development in Simulink
8
Modeling Mechanical Systems
9
Working with
Simscape Multibody
Build components
– Predefined solids
– Extrusions defined in MATLAB
Parameterize components
– MATLAB variables
– Custom dialog boxes
10
CAD to MATLAB
to Simscape Multibody CAD
1
1. Export from CAD to MATLAB code CAD2MATLAB_SolidWorks.swp
– SolidWorks:
CAD2MATLAB_SolidWorks.swp robot.m part.STL
– Other CAD System: Adapt code
2
to your CAD system’s API >> robot.m
11
Key Takeways
12
Challenges
Determine the sizing of the electrical components like motors and optimize the parameters
Develop appropriate control logic (Field oriented control and event based control logic)
Perform real-time simulation for rapid control prototyping and hardware-in-the-loop simulation
13
Challenge 3:
Determine the sizing of the electrical components like
motors and optimize the parameters
We need to model the motor, analyze the behavior by simulating the model and
optimize the parameters of the electromechanical system.
14
Model and Simulate DC Electromechanical System.
Model:
DC Motor
+
- Motor
Servoamplifier
Model:
a
b
c
Model: R = Resistance
L = Inductance
J = Inertia
+ 12V B = Friction
-
K = Back EMF Constant
Down Up
V- V+
Up Down
18
Optimize System-Level Performance
and Meet Design Requirements
u + s1 s2
y
s3
Controller Plant
19
Demo: Field Oriented Control of PMSM
Desired
RPM Vsq_ref
Isq_ref + Inv_Park Vs_alpha
PI PI
Transform Space
_ _
Vsd_ref
Vector 3-Phase
Isd_ref d,q Vs_beta
To
PWM Inverter
PI alpha,beta
_
Is_q Va Vb Vc
Park Is_alpha Clark
Transform Transform Ia
Ib
alpha, beta a,b,c
Is_d to Is_beta to
d, q alpha, beta
theta PMSM
Motor
21
Simulink Real-Time Enables Real-Time
Simulation and Testing
Rapidly create real-time applications from Simulink
models and run and test them with your hardware under
Metso was able to
test at normal operating frequencies, speeds, and timing. achieve multiple goals
simultaneously. They
were able to developed a
sophisticated controller
for digital hydraulics that
is more reliable, accurate,
and efficient than
previous systems, and
they were able to
accelerate their
development.
“Simulations in Simulink
and real-time testing with
Simulink Real-time
helped us deliver an
exceptionally reliable
control system.”
22
Real-Time Simulation and Testing Tasks:
Rapid Control Prototyping
0
I/O Output I/O Input
Wiring and
Signal Conditioning
Target Computer Hardware Physical Plant Hardware
23
Real-Time Simulation and Testing Tasks:
Hardware-in-the-loop (HIL) Simulation
Wiring and
Signal Conditioning
Embedded Controller Hardware
Target Computer Hardware 24