-
Notifications
You must be signed in to change notification settings - Fork 0
CPS_Components
The HyEQ Toolbox includes a series of blocks that model elements of a cyber-physical system (CPS). Those models are special instances of the hybrid systems blocks described in the Introduction to the Simulink-based Simulator , particularly the blocks that use embedded MATLAB functions. A cyber-physical system is given by the interconnection between a physical process, the plant , a computer algorithm used for control, the controller ; and the subsystems needed to interconnect the plant and the controller, i.e., the interfaces, converters, and signal conditioners . Most of the elements described in this section are presented in an extended form in [1].
In these notes, the temporal evolution of the variables of a cyber-physical system are captured using dynamical models. In this document, we advocate that hybrid dynamical system models can be employed to capture the behavior of cyber-physical systems. More precisely, the evolution of the continuous variables is captured by differential equations while the evolution of the discrete variables is captured by difference equations . These equations are typically nonlinear due to the complexity of the dynamics of those variables. Furthermore, conditions determining the change of the continuous and discrete variables according to the said equations/inclusions can be conveniently captured by functions of the variables, inputs, and outputs. The following Simulink blocks for cyber-physical components are provided with the HyEQ simulator:
The physical components of a cyber-physical system include the analog elements, physical systems, and the environment. Consider a model of a physical system given by a differential equation
This model can be implemented with the Hybrid System with Inputs simulink block found at this link .
The cyber components of a cyber-physical system include those in charge of performing computations, implementing algorithms, and transmitting digital data over networks. The tasks performed by the code (at the software level) and the logic-based mechanisms (at the circuit level) involve variables that only change at discrete events, not necessarily periodically.
We denote the state variable of the cyber components by
In certain cases, it would be needed to impose restrictions on the state and inputs to the cyber component. Such conditions can be modeled imposing that
Next, we provide specific constructions of models of cyber components.
1. Pure Finite State Machines.
A finite state machine (FSM) or deterministic finite automaton (DFA) is a system with inputs, states, and outputs taking values from discrete sets that are updated at discrete transitions (or jumps) triggered by its inputs. Then, given a FSM and an initial state
This model captures the dynamics the model of the cyber components given above with
Note that there is no notion of ordinary time
2. Analog-to-Digital Converters.
Analog-to-digital converters
(ADCs), also called
sampling devices
, are commonly used to provide measurements of the physical systems to the cyber components. Their main function is to sample their input, which is usually the output of the sensors measuring the output
The model for the sampling device we propose has both continuous and discrete dynamics. If the timer state has not reached
In practice, there exists a time, usually called
the ADC acquisition time
, between the triggering of the ADC with the sampling device and the update of its output. Such a delay limits the number of samples per second that the ADC can provide. Additionally, an ADC can store and process finite-length digital words, which causes quantization. The model above omits effects such as acquisition delays and quantization effects, but those can be incorporated if needed. In particular, quantization effects can be added to the ADC model by replacing the update law for
3. Digital-to-Analog Converters.
The digital signals in the cyber components need to be converted to analog signals for their use in the physical world. A
Digital-to-analog converter
(DAC) performs such a task by converting digital signals into analog equivalents. One of the most common models for a DAC is the
zero-order hold
(ZOH) model. The output of a ZOH is updated at discrete time instants, typically periodically, and held constant in between updates, until new information is available at the next sampling time. We will model DACs as ZOH devices with dynamics similar to the ADC model. Let
4. Digital Networks.
The information transfer between the physical and cyber components, or between subsystems within the cyber components, might occur over a digital communication network. The communication links bridging each of these components are not capable of continuously transmitting information, but rather, they can only transmit sampled (and quantized) information at discrete time instants. Combining the ideas in the models of the converters in the previous items, we propose a model of a digital network link that has a variable that triggers the transfer of information provided at its input, and that stores that information until new information arrives. We assume that the transmission of information occurs at instants
At every
Note that the update law for
[1] R. G. Sanfelice. CMPE142 Class Notes - Introduction to Cyber-Physical Systems. https://hybrid.soe.ucsc.edu/cmpe149-249-2016
- Creating and Simulating Hybrid Systems
- Plotting Hybrid Arcs
- Creating and Simulating Composite Hybrid Subsystems
- Updating Code Designed for HyEQ Toolbox v2.04 to Use v3.0 Features.
- Example: Composite Hybrid System with Zero-order Hold Subsystem.
- Example: Composite Hybrid System with Switched Subsystem.