February 7, 2023

Modern Control System Design: Building the Ultimate Automatic Response Systems

Control System Design: Building Automatic Response Systems

Control systems are everywhere doing important functions in usually undetectable ways. Pressing irons turn on and off heat, traffic lights on the roads turn green, yellow and red, cruise control systems keep your car moving at a constant speed, and systems monitor weather conditions, and more. Control systems are often embedded within other systems to function without human intervention, and their subtle operations greatly impact a limitless range of modern technological processes. 

Control system design has come a long way since the turn of the century, contributing actively to the switch from one-way process machinery to highly dynamic systems capable of self-management and auto-correction. 

What are control systems?

Control systems are embedded units that manage, regulate, and coordinate the operation of larger systems or compound devices in real time. They are able to upgrade inputs using signals observed from certain output, creating a self-regulating or auto-correcting mechanism to facilitate desired responses. 

Control systems have extensive applications across every industry, from aviation and food production to factory management and automotive. Automatic control systems make it possible to deploy larger and more sophisticated systems that can fully function on their own without human intervention. They also promote better safety protocols with modern technology; for example, everything that incorporates a heat-regulating thermostat is far less likely to cause a fire or some form of dangerous overheating problem.

How do control systems work?

Control systems work by establishing a clear mathematical relationship between the incoming signals, outgoing signals, and returning signals known as the feedback. While not every control system incorporates a feedback mechanism, they generally work by passing signals derived from a sensor through a controller/plant, and the final output picks up an external response and routes it through a feedback path. The signal from the feedback triggers the auto-correction and self-regulatory function of the system to produce a desired output.

A real-world example could be found in an aircraft's flight path control system, also known as the flight management system (FMS). Using GPS, the flight control system has a unit of sophisticated sensors that can detect every activity within the aircraft's flight plan. This data is sent back to the system as feedback and it automatically reroutes the plane's path to prevent mid-air collisions.

Why do we need control systems?

Control system engineering finds vast application in a wide range of analytical and decision-making processes. The primary aim of control systems in every industry is operational enhancement. Most pieces of machinery, devices, or larger systems incorporating control loops are safer and more efficient at resource management. Across the aviation, automotive, construction, petroleum, production and design industries, control systems are used to save time, costs, ensure safety and improve product performance by managing certain metrics that humans simply cannot control efficiently.

Elements of a control system

Control systems are of various types and serve different general or specific purposes. They usually comprise a wide range of units and subsystems, however, a few core elements should never be missing in any solid control system design process. A typical control system block diagram would depict the following:

  1. Sensors: detecting and measuring physical stimuli in the environment and passing the information into the system
  2. Controller: this is a processing unit that attempts to minimize the deviation of the actual value from the desired value
  3. Plant: this is the unit whose output you aim to control with the input signals from the sensor
  4. Actuator: an electromechanical unit that converts electrical signals into mechanical action, such as opening a valve, closing a circuit, or triggering some other physical actions.
  5. Feedback system: receives the output or some parts of it and routes it back to the input to update the next output from the plant. Feedback systems are not built into linear control systems

Types of control systems

Two major types of control systems exist based on incorporating feedback mechanisms. They are:

  • Open loop control system
  • Closed loop control system

Open-loop control systems

An open loop control system has no feedback path and as such, the output has no effect on the input. The output depends on the input but does not at any turn reroute signals to the input channel. Open-loop systems have generally simple and easy-to-construct circuits but they can cause a major deviation from the self-regulatory capability expected of any control system. They are more stable but less reliable - poorly equipped to handle anomalies in the environment.

Some common instances of open-loop systems would be the regular bread toaster, which continues heating bread for a predetermined amount of time, regardless of the amount of heat that has already been applied. In industrial processes, an open-loop product sealer would continue jamming its metal plates together if unmanned, with no way of knowing that the entire product line has been exhausted.

Example of open-loop control systems

Some other examples of open-loop control systems include:

  • Timer-free industrial equipment
  • Servo or stepper motor systems
  • Automatic clothes dryer
  • Washing machines
  • Electric light bulbs

The closed loop control system

A closed loop control system is a feedback control system - incorporating a signal return path where the output depends on the input and the input also depends on returning signals from the output. This means the control system has a fully-interconnected closed circuit where signals can travel back from the output to the input. 

Closed loop systems are more complex to construct but they facilitate auto-correction and self-regulation within the devices. Depending on how they are designed, closed loop systems may be equipped to adjust to anomalies in the environment without human intervention.

A common instance of closed-loop control systems in action would be a sunseeker solar system. The system consists of a Light Dependent Resistor sensing changes in the sun's voltage. The voltage is read by the LDR sensor and passed through the differential amplifier. The converted signal is then passed to the AC motor which triggers a change in the position of the solar panels to face the heat of the sun. With this self-managing technology, you don't have to worry about your panel not facing maximum sun direction.

Examples of closed loop systems

Other examples of closed-loop control systems include:

  • Thermostat incorporating devices such as electric irons, air conditioners, water heaters, etc.
  • Voltage stabilizers
  • Missile launchers that change direction according to target displacement
  • Induction cookers

Designing control systems

Control systems engineering as a major discipline has evolved tremendously from the past, since the pre-70s when pneumatic controls were very common. Today, control systems engineers are trained to create limitless possibilities with digital devices programmed to produce desirable outcomes. 

Control systems design techniques may vary according to the type, complexity, and purpose of the system. There are also techniques for designing linear systems - where the output is directly proportional to the input, or non-linear systems, where the principles of homogeneity and superposition are violated. The latter produces effective and satisfactory results but is generally more complex to design.

Below are a few standard processes in designing control systems:

System Concept

The system concept is a formalized description of the components, functions, purposes, control objectives, architectures, modules, subparts and general details of the intended control system. It's a preliminary definition and outlining process to list out all the necessary functionalities and intended operational procedures of the system to be built. For example, in the autonomous vehicle industry, the system concept stage largely involves defining and establishing the level of autonomy desired for the proposed vehicle, basically the most important point for defining the control system objectives.

The system concept, as the name implies, is a conceptualization phase where all relevant ideas are outlined for approval and deselection.

Feasibility Analysis

"Will this control system really be able to exert this level of regulation when physically deployed? Are we on the right track or are we just building castles in the air?"‚Äć

This is the basic point of a feasibility analysis. Control systems are easy to overestimate and engineers need to deeply understand their concept and proposed capabilities for the intended system. In the real world, there are certain limitations to control system design. A feasibility analysis involves a series of processes and steps, including prototyping and simulation, undertaken to ensure that the control system would work in real-world situations.

Rapid Prototyping

To further confirm the feasibility of the intended system, rapid prototyping is implemented in control system engineering. These prototypes can be virtual using system design tools such as Collimator. They can also be physically implemented by the processes of additive layer manufacturing, molding, and 3D printing. To get the best possible assessments, engineers can go further to implement the electrical connections and deploy embedded code.

The goal is to develop a model as similar to the control system as possible. High-fidelity rapid prototypes are more desirable, where the model very closely resembles the intended system in design and functionality.

Functional Design Specification

The functional design specification (FDS) is a document drawn from the result of the system analysis. In control system design, engineers will list out all the functional requirements expected for the intended system to reach its performance goals. From synchronization to error handling techniques, the FDS describes all operational philosophy of the system's solution and how it will function based on the desired outcomes.

The FDS is an outline of the system's control philosophy, and as such, it has to be thoroughly compiled and tested in the subsequent phases. The FDS also details the scenarios that may occur upon interaction between subsystems including the control system and the plant or actuator.

Building the Plant Dynamics Model

In control systems technology, the plant is the system to be controlled, the entity which the control system seeks to regulate. It could be as small as an automatic-sensing light bulb with a single input and single output, or as massive and complicated as an F16 fighter jet with a large number of input and output units.

The plant dynamics model is a representation of the behavior of the plant, including all the characteristics that would eventually interact with the control system. Modeling the behavior of the plant is crucial to the control system design process as it provides practical context for simulating the operations of the control system. The following are different types of plant models used in the design of control systems.

Physical Modeling

This involves the use of mathematical equations and processes to represent the system. In control system simulation, mathematical representations are often focused on defining and outlining the direct relationship between the input and the output. It involves lots of transfer function reduction and electrical representations of physical phenomena.

Important factors to consider during physical modeling:

  • Inputs and outputs: Single-input-single-output (SISO) systems are the easiest to model and represent, while multi-input-multi-output (MIMO) often require more complex design sprints
  • Linear and nonlinear system: Linear systems are where changes in the outputs are proportional to changes in the input. This is not true for nonlinear systems. Linearity is simple to understand but not common in complex, real-world systems
  • Continuous time and discrete time systems: Continuous systems are systems where the state variables change continuously over time, e.g., flow of water through a pipe. Discrete systems are systems where state variables change only at discrete set points in time, e.g., controller programs. Time values must be defined for proper functioning of the system

System Identification (SysID)

This is another process involved in physical modeling where statistical methods are used to mathematically represent and visualize control systems. System identification is a more complex approach because it requires modeling via measured data, but it can be effective in data rich environments. Parameters have to be set and values must be filled in to use statistical methods such as curve fitting, time analysis, frequency domain analysis, regression inspection, maximum likelihood and Bayesian estimation techniques in the plant modeling process.

Model vs Physical System Comparison

After building out the plant model, engineers will review the data against the real-world plant to identify any differences that are unaccounted for. This process in designing control systems ensures a high-fidelity development process and reduces error to an acceptable margin. If the data obtained from running values through the mathematical model closely matches the output of the real-world system (if it already exists), then a smooth design process is underway.

However, if the results of the comparison are thrown off, the control system might not interact efficiently with the host plant. Modifying the mathematical models or using alternate statistical methods is a great way to rectify these anomalies.

Building the Controller Algorithm

The controller algorithm is the mathematical or computational rule that governs the function of the control system. Often, it will include logical actions that provide a set of instructions. The control algorithm is often written in low-level programming languages such as C or C++ to ensure speed of execution. 

In this process, the pre-generated mathematical and statistical models are used to confirm that the controller algorithm performs according to specifications. Examples of common controller algorithms for control system design include:

  • PID control
  • Model predictive control

PID control

PID stands for Proportional, Integral, Derivative. The PID method is the most widely used control algorithm in industrial processes, mostly because it's relatively easier to implement than others, and also because it has a wide range of performance capabilities.

In the PID control algorithm, the main objective is error mitigation by mathematical reduction. The PID algorithm extracts an error value from the feedback path of the control system, which means it's more effectively used in a closed loop control system. It passes the error through the proportional, integral, and derivative terms where a multiplication of the rate of change produces a reduction in the system overshoot. 

Model Predictive Control (MPC)

Model predictive control (MPC) or model-based predictive control is an advanced form of controller algorithms that's highly efficient for making predictions about multi-input-multi-output (MIMO) control systems. It uses model-based predictions and optimization techniques to generate a sequence of ideal control actions for a process model. The model is updated continually as data from the real system model becomes available, which feeds the control feedback loop and allows MPC to have highly accurate predictions and a fast response time. 

At each step in the model, model predictive control identifies a set of control variables that will minimize the model's cost or error compared with its dynamic model prediction. By ordering these controls in sequence, an MPC controller can be used to provide high-level guidance over nearly any process. The resulting performance benefits make it particularly appropriate for applications that rely on fast and accurate management of complex processes.

Verification and Validation

"Verification: Are we building the product right? Validation: Are we building the right product?"‚Äć

If you're utilizing control system technology to automate a model self-driving car for example, you'd have to run the highest levels of big data testing before remotely considering finalizing your product. Verification involves all the procedures, real-world tests, backend checks, direct applications and beta testing involved in ensuring that the software has been designed and developed according to the specified requirements. Validation primarily ensures that the right control system has been built for the larger system.

Verification & Validation is one of Collimator's most outstanding capabilities. Collimator allows engineers to import big data directly via API, test software models using Python or a graphical UI, validate system performance in real-time, and create reports to share with their team.

Model-in-the-Loop (MIL) Testing

In control system design, model-in-the-loop testing should be conducted in consequent repetitions to ensure high precision. The first version of the model may be a gross approximation of the system but the model is enhanced as the development process progresses. Additional detail is added and the simulation is run at a higher fidelity to get to a more precise approximation. 

The elements of the system that have high uncertainty and high risk should be prioritized and developed to run at the highest level of fidelity to account for as many edge cases as possible. This is in order to raise the technology readiness level (TRL) of the overall system early while the cost to change is low.

MIL testing results will typically be analyzed with the following in mind:

  • System response
  • Stability conditions

System Response

The system response in a control system refers to the amount of time it takes for an input to produce an output or series of outputs, and this includes the internal changes that occur during this process. In nonlinear MIMO systems or in closed loop control systems, achieving an optimal system response profile involves accounting for major complexities. 

Some common analyses concerning system response in control system technology include:

  • Time response analysis
  • Frequency response analysis
  • Rise time analysis
  • Percent overshoot analysis
  • Settling time analysis
  • Steady state error analysis
Time response analysis

Time response is a type of system response that simply denotes the speed and time taken for an input signal to effect a desired output. Time response analysis refers to a study of the system's performance in the time domain where the output varies directly with time. Analyzing time response especially in the design of automatic control systems provides insights into possible ways of improving the speed and performance of the controlling unit by reducing redundancies and canceling out unnecessary subprocesses.

Time response is usually analyzed in two different categories: 

  • The transient state response which is the time required for the system to transform from one state to another before achieving the desired result
  • The steady state response which is the time required for the system to achieve the desired output while maintaining a stable and consistent state
Frequency response analysis

This is applicable in the steady state when sinusoidal input signals are applied at varying frequencies to the system. The frequency response analysis is a test of the system's performance under the frequency domain when time is invariant. It can also be categorized into transient and steady state, depending on the reaction of the system.

Analyzing the frequency response is a highly important testing process in control systems design. For massive and complex systems such as autonomous vehicles, attaining an optimal frequency response assures the designers that the control system can be relied upon to regulate itself even during poor weather or unfavorable driving conditions.

Rise time analysis

Checking the rise time allows control system engineers to determine a parameter nearly equivalent to the embedded system's startup time. The rise time is the amount of time it takes for the system to attain a desired output from an initial state of rest or a level zero. It is not to be confused with the time taken for the system to move from an initial state of rest to the desired output, but the time it takes to first hit the target output. 

The rise time is tested to ensure optimal speeds and no redundancies in the control system's activation.

Percent overshoot analysis

In real-world control systems, failure to accurately examine the system and determine the percent overshoot can lead to serious damage in the system's circuitry. Also known as percentage overshoot, the percent overshoot is a metric that calculates the extent to which the output has exceeded its target value. This usually happens when the control system is not adequately damped or when errors have been made in the mathematical modeling process.

For certain control systems, a small margin of percent overshoot is permissible. However, in highly volatile systems such as a car cruise control system, the designers would have to minimize the overshoot to the barest minimum possible to prevent catastrophic outcomes.

Settling time analysis

If you're driving a regular automatic transmission vehicle, observe the time it takes from acceleration (input signal) to taking your foot off the accelerator pedal and the vehicle switches into a steady cruise control. If it takes twenty seconds, you'll probably be scared for your life. However, in most modern vehicles, cruise control switches on instantaneously and keeps the car at a steady speed without further acceleration.

The time it takes for the vehicle to move from the target value to the final desired value is the settling time. Some control systems may never attain a perfect settling time due to constant interferences and tiny vibrations, such as a flight control system managing consistent micro turbulence. Engineers test the settling time to ensure a safely close range within the rise time.

Steady-state error analysis

Control systems can be unpredictable, regardless of the frequency of simulations and accurate modeling in the preliminary design phase. Environmental conditions can never be 100% fully accounted for, and sometimes, an input signal will reach a steady state that is not exactly the desired final value of the system. The difference between a current steady state value and the actual desired value is the steady state error. Of course, in complex systems, this error can cause major problems, unit breakdowns, and straight-out system failure.

Steady state error is tested in the design of control systems and most times, major changes would have to be made to the design to attain the desired output.

Stability Conditions

Stability is a critical issue in control system design. According to universal design standards, when building control systems, if the internal processes do not pass a standard stability evaluation, there's no need deploying or commercializing the system. Stability ensures that the output is under control even with minimal errors existing amidst environmental interference.

It is also described as the ability of the control system to produce a bounded output when a bounded input is received. A stable system provides a bounded output when an input is applied. A critically stable system can experience some oscillations within the output boundaries, while an unstable and unsafe system produces an output that's out of bounds by a wide margin.

Software-in-the-Loop (SIL) testing

Software-in-the-loop (SIL) tests are performed after the designers have auto generated code. This can be done using an automatic C code generator such as Collimator's codegen tool. The goal is to detect errors in the software code and resolve them. It includes running the generated C code and comparing the results to the MIL test. 

If the results are different from MIL, then there was either an error in the generated code or the model that needs to be reviewed and resolved. In control system design, another major purpose of the SIL test is to provide a reference point for the hardware test with the auto generated code.

Processor-in-the-Loop (PIL) testing

Processor-in-the-loop (PIL) tests are performed following the compilation and deployment of the resulting C code to the controller or FPGA. The aim here is to confirm that the compiled code works on the target system's processor. It includes running the processor against the plant model to ensure that the processor can run the control logic and perform all the required tasks. 

PIL testing when designing control systems can also be carried out on an FPGA. In this case, it is defined as the FPGA-in-the-loop (FIL) testing.

Hardware-in-the-Loop (HIL) testing

HIL testing is the final verification step which is used to confirm that your auto generated code functions accurately in real-world situations. The auto generated code is run against the plant model on a real-time system such as dSpace. The system then carries out deterministic simulations that emulate real-world events down to the physical connections of the developed system to the processor, inputs and outputs, and communication protocols confirming that the system's control objectives are satisfied.

Deploy to Production

Finally, the control system is deployed to actual production where all the necessary parts are either manufactured or assembled (if they are bought off-the-shelf). The control system is carefully put together and code deployed to the embedded system. All aspects of control system design lead up to this final stage, where a host of manufacturing processes and final real-world testing procedures are undertaken to get to the finished product.

Relevance of control systems to modern industry

Perhaps, the most relevant point of use for control systems in modern industry is in safety enhancement. Control systems have become so intricate, intelligent and powerful that they can actively protect larger systems and their human handlers from unprecedented anomalies such as over-heating, over-driving, misdirection, and several other scenarios.

Some other benefits of control systems include:

  • Quality assurance across all fields. Manufacturers and operators worry less about human intervention and error possibilities
  • Design and development of all kinds of autonomous vehicular systems - the future of transportation
  • Reduction of labor costs since less manpower is needed to physically control systems
  • Control system technology simplifies the decision-making processes as their efficiencies are factored into upgrades and fresh innovations
  • They coordinate production lines and assist in targeted production planning

Challenges with control systems

While control systems are a great innovation in the technology industry, they also pose a few points of difficulty for engineers and the industry at large.

  • Control systems design can be costly and complex to implement. Ranging from small one-way circuits to massive interconnections of multiple controlling units, the complexity of these systems can be costly
  • Control systems affect human jobs and employment in industry, as they often eliminate the need for human management of certain processes
  • Software errors are possible, especially when the system is overloaded with signals it cannot handle properly, thereby deviating from the control objectives

Why choose Collimator for control systems?

Collimator is the first Python-based control system design platform that engineers can use to design classical control system algorithms and forward-thinking AI based control system design. 

Collimator provides a unified environment to design, simulate, test, and continuously upgrade embedded controllers in a world where big data and AI are used to improve control system response, reduce development risks, and bring products to markets faster. Try Collimator today to: 

  • Design control systems using Python notebook or a smooth graphical user interface.¬†
  • Perform in-depth analysis of your control systems using our integrated toolkit
  • Call external libraries and models directly within Collimator
  • Use artificial intelligence and machine learning tools to generate synthetic data or model control systems
  • Use the high-power computing (HPC) capabilities to run millions of simulations in the cloud, regardless of your PC's computing power before deploying to your real system
  • Continuously compare real-world operations with virtual simulations in real-time

Book a live demo with our team to get started!

Frequently Asked Questions

See Collimator in action