当前位置:首页 >> 交通运输 >>

MBSD2 Lecture 6 Genset, Building a System Controller


Advanced Model-Based-System Design
Lecture 6: Creating a Genset and Building a Formal Controller

2

Building a Formal Controller
? Create a Engine/Generator “genset” to charge the battery. ? Add engine speed control. ? Engine starting and stopping. ? Start with the previous model.

1
Copyright 2009 Rose-Hulman Institute of Technology.

Complete Model
? Copy the electric motor model and rename it “Generator.” ? We will use the same model for the motor and generator. ? If we want different properties for the motor and generator, we can use the same “motor” block but use different lookup tables to give the motor different properties.

3

Complete Model
? Copy the engine model subsystem we created earlier and place it in the model. ? Make connections as shown. shown ? Connect the drive lines with the shared environment block.

4

2
Copyright 2009 Rose-Hulman Institute of Technology.

5

6

Modify the Generator Subsystem
? Change the names of ports from “Motor” to “Generator.” ? C Change the name of signals on the bus f from “Motor” to “Generator.”

3
Copyright 2009 Rose-Hulman Institute of Technology.

7 Changed.

Changed.

Changed.

Changed.

Model Connections
? Connect the Generator to the Battery voltage. ? Connect “Generator” current on the Generator Battery to the Generator Current ? Connect the Engine and Generator Diagnostic Ports to the Vehicle_System_Diagnostics bus.

8

4
Copyright 2009 Rose-Hulman Institute of Technology.

9

Model Connections

10

Vehicle System Bus Changes

5
Copyright 2009 Rose-Hulman Institute of Technology.

Control System Design
? We now have the system to a point where we can start to build our control system. ? The electric motor drives the vehicle vehicle. ? When necessary, the engine can be started with the generator and then charge the battery.

11

Engine Speed Control
? We will first develop a method to start the engine and control the engine speed. g y ? We have a generator directly connected to the engine. This generator can act either as a motor or as a generator. ? We can use motor/generator to spin up the engine to start the engine. g pp y ? We can use the motor/generator to apply a torque in the opposite direction to the engine torque to regulate the engine speed.

12

6
Copyright 2009 Rose-Hulman Institute of Technology.

Engine Speed Control
? We will use classical feedback control with proportional feedback. ? The engine throttle will be held constant constant. ? Monitor the engine speed.
– If the engine speed is to slow, reduce the opposing M/G torque. – If the engine speed is too high, increase the opposing M/G torque.

13

Engine Speed Control
? This is a classical feedback system.

14

? In our case, the plant is the system comprised of the Engine coupled to the Motor/Generator.

7
Copyright 2009 Rose-Hulman Institute of Technology.

Engine Speed Control
? Modify the controller as shown next. ? For the moment, we will not use the S a e o chart. Stateflow c a ? Note that our torque request to the M/G is constrained between -1 and +1. ? We will pick an arbitrary value for the engine throttle. ? Charging Engine rpm is a constant Charging_Engine_rpm defined in the init file and is 1800 rpm.

15

16

8
Copyright 2009 Rose-Hulman Institute of Technology.

Engine Speed Control – Top Level
? Modify the top level block diagram as shown.

17

Engine Speed Control
? When we run a simulation
– The engine should speed up to 1800 rpm y possible. immediately and as fast as p – The generator should charge the battery at some current determined by the engine throttle.

18

? Run a simulation and plot the engine speed and M/G current.

9
Copyright 2009 Rose-Hulman Institute of Technology.

19

Battery Current Mostly Positive. M l P ii

SOC Increasing.

RPM constant at ~1860.

Engine Speed Control
? We see that the feedback loop does control the engine rpm very well, and that the generator charges that battery battery. ? If we zoon in on the engine rpm at the beginning of the simulation, we see that the rpm ramps up from 0 to 1800 rpm very quickly.

20

10
Copyright 2009 Rose-Hulman Institute of Technology.

21

Here the generator acts as a motor. Energy is removed from the battery to overcome compression and spin up the engine. p p g

Engine rpm goes from 0 to 1800 in about 140 ms. This isquite fast.

Engine Speed Control
? There are a few issues with the controller that we must fix. ? We need to modify our control scheme to:
– Turn on the engine only when necessary. – Ramp up engine speed in a controlled ramp. – Turn on the engine when it reaches the appropriate speed. – Ramp down the engine when we no longer need to charge.

22

11
Copyright 2009 Rose-Hulman Institute of Technology.

Stateflow Engine Control
? Read Charging_Engine_rpm from the workspace. From Stateflow select Add, Data, Data and then Parameter

23

Stateflow Engine Control
? We will need to know the measured Engine rpm from the Simulink model. From Stateflow select Add Data and Add, Data, then Input from Simulink

24

12
Copyright 2009 Rose-Hulman Institute of Technology.

Stateflow Engine Control
? Stateflow will need to output the Engine Throttle and Desired Engine rpm to our Simulink controller. From Stateflow, select controller Stateflow Add, Data, and then Output to Simulink

25

26

Stateflow Engine Control
? Next, modify the Stateflow chart. ? When we need to charge
– Enable Motor/Generator. – Change the Desired Engine rpm to the value of constant Charging_Engine_rpm. – When the engine reaches this rpm, change the throttle from 0 to a specified value.

? When we need to stop charging
– Change the throttle to 0. – Change the Desired Engine rpm to 0. – When rpm reaches 10 rpm, disable motor/generator.

13
Copyright 2009 Rose-Hulman Institute of Technology.

Stateflow Engine Control

27

? Oops, we need another output to enable the Motor/Generator. From Stateflow select Add, Data, d then Output t Simulink. D t and th O t t to Si li k

28

Create The Stateflow Chart Below

14
Copyright 2009 Rose-Hulman Institute of Technology.

29

Controller Modifications

30

? The rate limiter in the previous slide is used to generate a ramp from the stepped signal coming from Stateflow. ? A rate limiter specifies the maximum positive and maximum negative rates at which a signal can change. ? Specifying rates of ±900 will cause the engine rpm to ramp up from 0 to 1800 or down from 1800 to zero in 2 seconds seconds. ? Our engine turn-on time will be 2 seconds. ? Part located in the Simulink/Discontinuities library.

Rate Limiter

15
Copyright 2009 Rose-Hulman Institute of Technology.

Rate Limiter Settings
Don’t forget this.

31

?Run a simulation first for the AVL drive cycle, then the FU505. ?Plot both the Engine rpm and the M/G current.

32

Zoom in here.

16
Copyright 2009 Rose-Hulman Institute of Technology.

33

Engine is up to speed, but the generator is using p g power, not , generating power. The generator is not charging the battery.

Here, the generator is g charging the battery.

Engine appears to be up to speed here.

Lecture 6 Exercise 1

Demo___________

34

? The generator appears to spin up the engine to the appropriate speed, the generator does not immediately start charging the battery. Instead there is a long delay before charging starts. This is an error. ? Fix the error so that charging starts as soon as the generators is up to speed. ? Your fixed model should have a plot as shown next.

17
Copyright 2009 Rose-Hulman Institute of Technology.

35

Zoom in here.

36

Negative current speeds up engine while off.

Generator current charges battery.

Controlled start.

Controlled stop.

18
Copyright 2009 Rose-Hulman Institute of Technology.

37

Throttle turns off before ramp down. Throttle turns on after engine reaches speed.

Lecture 6 Demo 1
? Demo the working controller.

38

Demo___________

19
Copyright 2009 Rose-Hulman Institute of Technology.


赞助商链接
相关文章:
更多相关标签: