Control_Design_and_Simulation_16

advertisement
Моделирование систем
Цифровой Обработки Сигналов
в среде LabVIEW
Круглов Евгений Владимирович, аспирант МИФИ
Решетов Владимир Николаевич, к.ф.-м. н. доцент МИФИ.
Москва 2008
Введение в LabVIEW Control Design
and Simulation
Agenda
• Введение в разработку
управляющих систем
• Системы идентификации
• Разработка динамических
систем
• Моделирование
• Создание прототипа
• Управление двигателем
Keep graphics
below the text
and to the right
Приложения
Control used to
manufacture product
Control embedded in
product
Precision Machine Control
Flight Control
Industrial Control
Motion Control
Engine Control
Разработка управляющих систем на базе
моделей
• Задачи
– Повышение гибкости управления
– Увеличение производительности и
• Инструменты
– Системы сбора данных
– Программы для
– Real-time hardware
Управляющие системы на основе моделей
System ID
Acquire I/O data from plant
System Identify plant structure and coefficients
Specification
Control
Analyze open-loop characteristics of plant
Analysis Design &
Select controller structure and coefficients (gain)
and Design
Simulation
Field Test
Calibration &
Functional Test
Analyze closed-loop characteristics of controlled plant
System
Rapid
Test
Simulation
Simulate offline controller and linear plant
model(HIL)
Prototyping
Simulate offline controller and nonlinear plant model
Code
Software
Real-Time
Generation
Prototype control algorithm with
real-world dynamics
Test
Архитектура управления и разработки
Speed
Setpoint
Error
Kc
Motor
Voltage
Controller
• Option A. Математическая модель
• Option B. Идентификация систем
Kp
Plant
Actual
Speed
Модель двигателя постоянного тока
Ri (t )  V (t )  K
d (t )
dt
J
d (t )
 Ki(t )
dt
d (t ) K
K2
J
 V (t ) 
 (t )
dt
R
R
Laplace transform:
JRs  ( s)  KV ( s)  K 2 ( s)
Угловая ск.
H(s) =
Входное нап.
 ( s)
K

V ( s ) JRs  K 2
Система идентификации двигателя постоянного
тока
• DC Motor System
– Ввод: Управление двигателем
(12V, PWM)
– Выход: квадратудный энкодер (5V,
digital)
• 500 Counts per Revolution
DO
Motor
Command
DI
Quad Encoder
Идентификация модели
• System Identification Toolkit
– Симулирование и измерение
отклика
– Идентификация коэффицентов
LabVIEW System ID Toolkit
LabVIEW Dev Sys
LabVIEW System
ID Toolkit
Stimulus
cRIO
Hardware
Response
Signals
DO
Motor Command
DI
Quad Encoder
System ID
Algorithms
DC Motor
Model
Создание контроллера
• Control Design Toolkit
– Разработка и анализ контроллера
LabVIEW Dev Sys
LabVIEW System
ID Toolkit
LabVIEW Control
Design Toolkit
LabVIEW Control Design Toolkit
DC Motor
Model
Controller
Model
Analyze
Design
Analyze
Closed-Loop
System
Plant
Controller
Симулятор системы
• Simulation Module
– Симуляция систем управления
LabVIEW Dev Sys
LabVIEW System
ID Toolkit
LabVIEW Control
Design Toolkit
LabVIEW
Simulation Module
LabVIEW Simulation Module
Speed
Setpoint
Controller
Model
DC Motor
Model
Actual
Speed
Симуляция системы управления двигателем
LabVIEW
Graphical differencing
Full programming environment
(logic, etc.)
Patented user interface
capabilities
Создание прототипа на базе Real-Time
Host PC
RT on
Desktop
RT on
CompactRIO
RT on
PXI
LabVIEW
Simulation Module
LabVIEW Dev Sys
• Прототип с LabVIEW RT,
RT
PXI, cRIO, or RT on a Desktop
Создание прототипа контроллера
• Simulation Module and
LabVIEW Real-Time
– Implement controller on realtime hardware
Speed
Setpoint
Host PC
LabVIEW
Simulation Module
LabVIEW Dev Sys
LV-RT
AI Scan
FPGA
CompactRIO System
LabVIEW Simulation Module
Controller
Model
Actual
Speed
DC Motor AO
Model Update
Бысрое создание прототипа
LabVIEW
Tight integration with real-world I/O
Seamless transition from simulation
to prototyping
LabVIEW Simulation Module
• Simulation Node
• Linear Systems
– Integrators, Derivatives, Transfer
Functions
• Nonlinear Systems
– Friction, Saturation, Dead Zone
• Discrete Systems
– Integrator, Zero-Order Hold, Transfer
Function Signal Generation
– Chirp, Pulse, Ramp, Sine, etc.
• Signal Arithmetic
– Gain, Summation, Multiplication, etc.
• Lookup Tables
– 1D, 2D, 3D
• Utilities
– Signal Collector, Simulation Parameters,
Halt Simulation, etc
• Graph Utilities
– Waveform, XY Graph
• Traditional LabVIEW VI’s and tools
Создание : LabVIEW Real-Time Control
Prototyping
LabVIEW Development
Software
LabVIEW Simulation
Module
LabVIEW Real-Time
Module
Ethernet
Communication
RT System
RT Controller
FPGA
Signal
Connection
DC Motor
Download