EVENT DRIVEN MPC FOR NETWORKED CONTROL SYSTEMS

EVENT DRIVEN MPC FOR NETWORKED CONTROL SYSTEMS

EVET DRIVE MPC FOR ETWORKED COTROL SYSTEMS G. Ewald* and M.A. Brdyś**, * Department of Automatic Control, Gdansk University of Technology, ul. a...

211KB Sizes 0 Downloads 107 Views

EVET DRIVE MPC FOR ETWORKED COTROL SYSTEMS G. Ewald* and M.A. Brdyś**, * Department

of Automatic Control, Gdansk University of Technology, ul. arutowicza 11/12, 80-952 Gdansk, Poland email: [email protected] ** Department of Electronic, Electrical and Computer Engineering, The University of Birmingham, Birmingham B15 2TT, UK email: [email protected]

Abstract: Because of variable delays and stochastic data packets loss networked control systems require suitable algorithms to ensure stability of the control system and guarantee desired control performance. This paper presents the idea of an event driven approach with MPC controller. In opposition to network compensation, where standard regulators are used, the presented solution integrates network with plant. A MPC based controller is applied to extended plant that consists of plant and communication network. In order to reduce network influence on control quality, control signal computation and control signal application are done, when a data receive event occurs. Copyright © 2007 IFAC Keywords: Control system design, Predictive control, Networked control system, Dynamic models, Networks, Event driven dynamics

1. INTRODUCTION Many modern industrial systems use distributed sensors and actuators. As the complexity and size of a systems grows, there is a need of communication networks, to reduce expensive and complex wiring. Using standard networks with standard protocols leads to low installation and parts costs, ease of reconfiguration and ease of maintenance. Control systems, where measured and/or control signals are transmitted trough a network fall into a group called networked control systems (NCS). General schema of a NCS is presented in the Fig. 1. Signals y and u are the original signals: measured output and control value. Signals ~ y and u~ are control and measured signals respectively, modified by the network.

Fig. 1. Networked control system diagram

As the network is a shared link, transmission delays in signals become variable because of limited capacity of a transmission medium. Moreover, in many cases, because of media access protocol data rejection or a packet dropout may occur. When a NCS is used to control plant with slow dynamics, where control system is oversampled, the network influence on control performance can be omitted. In order to improve control quality the network can be modeled as a constant transport delay. In case of plants with fast internal dynamics, a suitable control algorithm must be used. For simple plants Smith’s predictor may be used (Grega, 2005). If better control performance is required, a model predictive control (MPC) based solutions are often used (Yu et al., 2004; Gang et al., 2004; LoonTang and Silva, 2006). In the NCS design process two main approaches are used. The first one is based on a compensation. In the approach the network influence (delays and data dropout) on the control performance is compensated with a suitable algorithm (based on compensator or predictor) and non-networked controller is applied to the plant (Beldiman et al., 2000; Mu et al., 2005).

The second approach incorporates network influence in the controller design process (Yoo and Kwon, 2005; LoonTang and Silva, 2006). In such a control system, the controller as to controls a new plant, which consists of the plant and communication channels. This paper presents the MPC-based approach, where network influence on the control quality is taken into consideration in a controller design process. Moreover, presented approach is event-driven. The control signals are computed when measured data are received. Similarly, the control signals are applied to the controlled plant, when the actuator registers a new data receive event. 2. NETWORK – PROBLEM DESCRIPTION Communication networks are shared links, where data are transmitted serially. As many devices use the same link, data to be sent is kept in buffers of the transmitters, waiting for free transmission medium. Limited capacity of the communication channel is the main source of delays in data transmission – data placed in the transmission buffer waits until the communication channel is available. Data transmission over the medium is also the source of slight delays. The other source of transmission delays is data packet handling. The process of packing and unpacking data from packets is more important, if a standardized network architecture with a standard protocol is used. In this work, the transmission delay term refers to the summarized delay in the data transmission process, without considering its components. It should be remembered, that without clock synchronization, it is impossible to measure transmission delay of single data packet. On the other hand, it is possible to measure time of packet roundtrip time. Half of this value can be used as an estimation of a single packet transmission delay. Besides data transmission delay, network communication inducts one another communication problem: data packet loss. Communication issues or high computational load of mediating devices may cause the situation, where sent data would not be received. Moreover, as the transmission medium has limited capacity, new data is kept in the transmission buffers. Those buffers have also limited capacity, so if the buffer is full, no more data can be put inside. Values of the transport delay and probability of a packet loss depends mostly on the network load. If the network is heavily loaded, delays have bigger values and more packets are lost.

Many communication protocols handle the data loss by resending data, if an acknowledgment message from the packet destination has not been received. In case of the control systems, it would be better if the lost data were not resent. Sending additional messages and resending data, raises network load, what affects on the transmission delays and packet loss ratio. In case of a NCS, each packet should be send only once and it should be deleted from the transmission buffer, even if it was not received properly. Therefore, it is important to choose proper communication protocol to avoid high network load. On the other hand, it would be better for the diagnostics purposes, if the number of lost data packets or its estimation was known. In such a case a suitable action could be taken, especially in case of a communication link failure. To analyze network issues described above, an experiment has been performed. Investigated network was an office network, based on the Fast Ethernet standard. Basing on the ICPM protocol‘s echo command (the “ping” command) three computers were asked to send back packets to the data collecting unit. Investigated units were placed in different parts of the building and were connected to different sub-networks. Unit “Host 1” was connected to different sub-network. Communication was possible only trough the routing unit. Unit called “Host 2” was in the same network. Moreover, it was connected to the same network switch, as the data collecting unit. “Host 3” is one of the high performance servers, connected to the router’s subnetwork. Units were sending back packets of size 1024 bytes every minute. The experiment lasted for one weak, to allow identifying any network traffic patterns. In the Fig. 2 results of the experiment are presented. No patterns in the network load were observed. Delay values were usually in the bounded range, except single situations, when high delay values were observed. Periods of high delay values for each unit are probably dependent on the high computational load of the units. A temporary transmission disturbances can be the other source of a high delay values. As the Fig. 2 presents packet roundtrip time, it is hard to determine true single transmission delay values. A half of a value is only an estimate of a single packet transmission delay. If a transmission disruption was short, one way transmission could take most of the measured time. Moreover, in case of a complex network, i.e. internet, there can be more than one route connecting two network endpoints, thus measured round-trip time will consist of two route-dependent transmission times.

In the Table 1 maximum, minimum and mean delay values are presented. Moreover, the table presents the number of lost packets and probability of packet loss. Roundtrip time [ms]

Host 1 60

Roundtrip time [ms]

To make simulations, a suitable network model must be used. In some works (Samaranayake et al., 2003) network is modeled as a constant delay of mean or worst case of the measured values. In this work, network model is based on a FIFO buffer.

40 20 0 0

1

2

3 4 Time [days] Host 2

5

6

7

1

2

3 4 Time [days] Host 3

5

6

7

1

2

3 4 Time [days]

5

6

7

60 40 20 0 0

Roundtrip time [ms]

2.1. etwork model

60 40 20 0 0

Fig. 2. Packet roundtrip times for three examined hosts Table 1 Results of experiment - values of delay and probability of packet loss

Max delay [ms] Min delay [ms] Mean delay [ms] No of lost packets Prob. of packet loss

Host 1 67 3 3,85 764

Host 2 30 0 0.84 100

Host 3 47 2 2,82 40

0.066

0.009

0.004

High data loss ratios in the case of “Host 1” was the result of switching the machine of – most of packets were lost during the 9-hour period. It should be mentioned, that the analyzed network was not the industrial one and the network load was office-like. In case of non-industrial network and industrial-network-like load, where units are transmitting many small packets with high frequency, the measured network parameters may be worse. The network can be considered in many ways. First of all, the entire infrastructure can be considered in the modeling and control design process. In this work a network will be considered as a “black box”, that allows estimating some information, like transmission delay and data loss probability.

Until the buffer is not full, any incoming data is placed in it, with corresponding delay value. Delay value means how many internal “tics” data packet must wait before being sent, after the foregoing packet was send. Delay value is chosen randomly from the selected range. If the buffer is full, any incoming data are rejected. Moreover, the incoming data can be rejected with some probability, even if the buffer is not full, what models other data transmission phenomena. The network model described above, has been implemented in the Matlab/Simulink environment using the Type II S-function. The network model works asynchronously, with its own sampling ratio. Used implementation allows changing any parameters (maximum and minimum delay values, buffer size, probability of data rejection and internal clock), what makes it flexible and allows to examine its behavior in many cases. Used network model is also equipped with additional output, showing a new data arrival event. In order to show the influence of a network model on control quality of a control system model, simulations comparing two network models were performed. In the Fig. 3 responses of the control systems with different network models are presented. In both cases a simple proportional regulator was applied to the first order linear object. Dashed line in the Fig. 3 presents output of the control system, with network model described in this section. Solid line shows the output of the model, where the network is modeled as a constant delay. The value of the delay was chosen as “worst case” of delays used in advanced model. Simulations show, that the simple network modeling leads to different results, than using more complex one. Parameters of the network modeled with both described techniques, were chosen to show more explicit the control quality difference. Regardless used parameter values, there is a significant difference between both control systems. In some cases, control system modeled with the simple (constant delay) network can be stable, where control system with the complex network model (with variable delay and bounded buffer capacity) may become unstable.

2005). There are methods of finding optimal sampling ratios, guarantying the system stability at possible low network load (Zhang et al., 2001). In this paper sampling frequency is not taken into consideration.

0.9 0.8

System response

0.7 0.6

In general, networks transmitting control and measured signals differ as shown in the Fig. 1. In some cases whole data can be transmitted through the same network (in Fig. 1 networks N1 and N2 would be the same network N). Such a case makes the control design process easier, as the one set of parameters can be used in case of both network connections.

0.5 0.4 0.3 0.2 0.1 0 0

1

2

3 4 Time [s]

5

6

7

3. EVENT DRIVEN MPC

Fig. 3. Control system responses. Dashed line presents response of model with advanced network model. Solid line presents response of system with simple network model

Because the considered system can have variable delays in both signal lines, a suitable algorithm capable of handling this problem should be used.

It should be mentioned, that the buffer overflow can be helpful in case of NCS. If buffer is full, incoming data is rejected until the oldest packet is not sent, thus the maximum value of signal delay for each packet in the buffer is bounded. If buffer was unlimited, delay of following packets would grow to the unlimited value. Therefore, it is better to a send signal with vacant sampling than to aggregate network delays.

To ensure a good control quality and deal with the network a MPC-based controller is used, as the only controller that can carry on with transport delays in the signal. Moreover, as the transmission delays are time-variable, a new control signal values can be computed only, when a new data arrives, thus controller should be an event driven one. Furthermore, the presented solution can be considered both as an event driven and as a variable delay system.

2.2. CS control problem The control algorithm for a NCS must deal with variable delays in both transmitted signals. Control unit must also manage with loss in measured information, used to compute control signal values. Moreover, the control strategy for a NCS must include the probability of data loss in a control signal. In classical, time-based methods synchronization of the internal clocks of the devices is required. The clock synchronization is not a simple process and requires advanced algorithms (Schmid and Schossmaier, 2002). Usually only a limited precision may be archived. Therefore, an event driven approach is considered in this paper. Moreover, without synchronized clocks it is hard to measure the transport delays in the network, so other methods are to be used in order to incorporate communication channel in a control algorithm. It should be bore in mind, that performance of a NCS depends highly on the sampling frequency. In general, if the measured signal is sampled more frequently, the performance of a control system is better. In case of a NCS, high sampling ratio enlarges the network traffic, what increases transport delays and the probability of data packet loss, as more data are stored in the transmitters’ queues. This is socalled NCS sampling phenomenon (Ligušová et al.,

It is also important to choose a suitable optimization algorithm for the MPC. Small signal delays in control systems must be taken into consideration only in case of the plants with fast internal dynamics. In case of systems with small time constant values, control step is not a long one, thus chosen optimizer should be the fast one. Therefore, a genetic optimizer should not be used. In the subsections below methods of dealing with network problems are described. Subsections 3.1 and 3.2 show methods of dealing with data loss in signals, as subsections 3.3 and 3.4 describe methods of dealing with variable delays. 3.1. Data loss in control signal To protect the control system against the effects of data loss in a control signal, buffer-based solution (Liu et al., 2005) is used. The main idea behind this is sending current and number of future (predicted) values of a control signal to actuator instead of a single control value. The received control signal values are stored in the actuator’s buffer. In case of data loss in control line, following control values from the buffer are used. Controller produces discrete predictions of control signal, thus the control signal values are taken with selected frequency (same as controller sampling frequency) from the buffer. In

normal operation, a new control value set overrides the last one and the most recent control value is used. As control system is MPC-based, the prediction of a control signal is calculated in each algorithm step, so there is no need of an additional computation.

control signals only when a new measure signal data arrives. Therefore, if the delay is unknown and variable, but its estimation is known, the network model can be updated with ease. As the network is considered as a part of the plant, plant model in the MPC will be updated with new delay estimation and used with a new measured data when received.

3.2. Data loss in measured signal The data loss problem in a measured signal is solved indirectly with help of an event-based dynamics and buffering mechanism described before (section 3.1). As the control system dynamics is event-based, a new control signal is calculated only when a new data arrives to the controller. If no data arrives (because of the data packet loss in measured line), the controller takes no action and no new control signal is calculated. On the other hand, if no new control values are received by the actuator, control values sent previously are used. Hence, the eventdriven dynamics is responsible for not calculating a new control signal if a measured data is lost and the buffer-based solution is responsible for dealing with lack of a new control value calculated by controller. From the point of view of the controlled plant, it is always better to use following control values calculated by a the MPC, than keeping last control value as long, as a new one arrives. 3.3. Delays in control signal As mentioned before, controller is sending a data buffer instead of a single control value. Values from the buffer are used with selected frequency. Controller’s and actuators clocks are not synchronized, so it is hard to determine time moment, when the first control value has be used.

4. SIMULATION RESULTS In order, to illustrate an influence of incorporating communication network in control design process, some simulations were executed. In this section results produced with very-first implementation of the solution are presented. The implementation does not include the buffering mechanism described in the section 3.1, yet. Hence, simulation example does not include the data loss protection mechanism. Furthermore, the MPC algorithm does not use estimated values of network delays, but real delay values generated by the network simulation module. In the presented design in order to meet model changes in the MPC algorithm, number of MPC controllers with different models are used. Depending on measured values of a network delay, a suitable controller is used. This is only a temporary solution and next implementations will not use similar approach. The results produced by the event-driven solution are compared with results generated by the reference system – the control system with a standard MPC controller, designed without including the network influence on the controlled plant. 1.4

To deal with those delays, an event based approach is used. Control systems, basing on a transport delay estimation for control signal, calculates control values to be applied exactly on data arrival.

The network delay (estimation) may change in every algorithm step, thus the plant model used in every control step need to be updated with a new delay estimate, as the network is considered as a part of the plant. 3.4. Delays in measured signal The event driven approach helps also to deal with a measured signal delays. The controller calculates

1

System response

In the other words, according to the NCS schema presented in the Fig. 1, controller has to calculate not the u signal but the u~ basing on the network delay estimation.

1.2

0.8

0.6

0.4

0.2

0 0

0.5

1 Time [s]

1.5

2

Fig. 4. Responses of two modeled control systems. Dashed line presents the response of the system designed not meeting network. Solid one presents the system projected meeting network environment

In the Fig. 4 step responses of both systems are presented. With solid line response of the eventdriven system including network at design level is presented. The dashed line presents response of the reference system. To minimize the influence of randomly chosen delays, the control and the measured signals were transmitted trough the same network model for both control systems. In such a case, the influence of random chosen delays on the control quality for both systems is comparable. On the other hand, in each algorithm run, delay values were chosen randomly, so each simulation results were slightly different. Results produced by the event-driven MPC algorithm were generally better than produced by the reference system. In most cases, the event-driven solution has smaller overshot, as presented in the Fig. 4. Moreover, the proposed solution faster reaches the reference value. It should be also mentioned, that in case of bigger delay values, the reference system is becoming unstable, whereas the event driven solution is still able to control the system with acceptable control quality. 5. CONCLUSIONS AND FUTURE WORK In this paper, idea of the event-driven model predictive control for networked control system is presented. All the main control problems were taken into consideration. First simulation results of the first implementation show, that using the event-driven MPC controller improves quality of control in the NCS. Future work will include algorithm and its implementation development. Development of the algorithm will include tests with a fault tolerant MPC (FTC) as a method for dealing with a data loss in measured signal. Implementation development will lead to implementation of all presented solutions. Moreover, the MPC controller allowing model changes will be built. Furthermore, the formal analysis of presented approach stability will be executed. In the future network delays estimations will be used instead of measured delay values. Moreover, hardware-in-the-loop simulations will be performed to confirm the simulation results. ACKNOWLEDGEMENT This work has been supported by the Polish State Committee for Scientific Research under grant MiSterJa, No.4 T11A 008 25. The authors wish to express their thanks for the support.

REFERENCES Beldiman, O., G. C. Walsh and L. Bushnell (2000), Predictors for networked control systems. Proc. of the American Control Conference, Illinous, June, 2000 Gang, X., Y. Shiminga and Yu Li (2003). MPCbased computer network control strategy with stochastic time delay. IEEE International Conference on Systems, Man and Cybernetics, 4 Grega, W. (2005), Distributed control of air heater model via Ethernet network. (in Polish) Proc. of VI ational Automatics Conference (KKA), Warsaw, 27-30 June, 2005 Ligušová, J., J. Liguš and K. Horanský (2005), Algorithms of networked control system design. Proc. of 16th IFAC World Congress in Prague. Prague, 3-8 July 2005 Liu, G. P., Y. Xia and D. Rees (), Predictive control of networked control systems with random delays. Proc. of 16th IFAC World Congress in Prague. Prague, 3-8 July 2005 LoonTang, P. and C. W. de Silva (2006), Compensation for transmission delays in an Ethernet-based control network using variablehorizon predictive control. IEEE transactions on control systems technology, 14, 707-718 Mu, S., Tianguang Chu and Long Wang (2005), Impulsive control of discrete-time networked systems with communication delays. Proc. of 16th IFAC World Congress in Prague. Prague, 3-8 July 2005 Samaranayake, L., S. Alahakoon and K. Walgama (2003). Speed controller strategies for distributed motion control via Ethernet. Proceedings of the 18th IEEE International Symposium on Intelligent Control, ISIC03, Houston, USA, October 2003, pp. 322-327 Schmid, U. and K. Schossmaier (2002), Intervalbased clock synchronization with optimal precision. Information and Computation. 49 Yoo, H. and O. Kwon (2005), Networked control systems design with time-varying delays. Proc. of Proc. of 16th IFAC World Congress in Prague. Prague, 3-8 July 2005 Yu, J., Y. Mei and S. Yu (2004). MPC-based method dealing with vacant sampling and data rejection in networked control systems. Proc. of the Third International Conference on Machine Learning and Cybernetics. Shanghai, 26-29 August, 2004 Zhang, W., M. S. Brancky and S. M. Phillips (2001). Stability of networked control systems. IEEE Control systems magazine, 21, 84-99