# Section 6.13 State space systems files

This subsection describes the state space systems files which are being planned as part of the control101 toolbox. These are still in preparation and will be added when checked. Current drafts are available here.

A summary of the files is given next, in the order in which they might be used as part of state space delivery in a taught module. These files are all constructed in the form of livescript files, that this is they combine detailed explanation in a relatively neat format alongside code snippets demonstrating the use of MATLAB tools. The hope is that these provide templates of the typical analysis and design methods that most students would need to use. Please do let us know if you spot any critical gaps, and by all means help us author files to fill these gaps.

The latter files use Simulink as it becomes quite fiddly and messy to capture more realistic scenarios with feedback, observers, integral action, constraints and more with simple algebra/code. MATLAB 2023b was used to create these files so they may not be compatible with earlier versions of MATLAB.

statespace_models_control101 This is the first in a sequence of files looking at state space models and begins with how to define the model in MATLAB.

tf_models_from_statespace_control101 This file focuses on how equivalent transfer function models can be determined from state space models, both continuous and discrete.

discrete_time_state_space_models_control101 This file focuses on how to determine a discrete time state space model, given one already has the continuous time model. Some brief theoretical background is given before focusing on the code.

statespace_models_from_tf_control101 This file focuses on how equivalent state space models can be determined from a transfer function model, both continuous and discrete.

openloop_behaviour_statespace_control101 This file focuses on how to infer and explore the expected open-loop behaviour of a state space models, both continuous and discrete.

phaseplane_behaviour_statespace_control101 This file focuses on how to infer the expected open-loop behaviour of a state space models, within the phase plane, that is the behaviour of the states rather than the inputs and the outputs. It is interesting to note how this behaviour can be linked to the eigenvalue/vector decomposition of the state matrix.

equivalent_state_space_formulations_control101 This file focuses on equivalent forms, that is, state space models which appear different but have the same input-output behaviour. The file gives a brief overview of the underlying relationships and then gives MATLAB code for showing the relationships between two equivalent forms.

controllability_and_observability_control101 Controllability and observability are important properties of state space models which determine the extent to which effective state feedback compensators and observers can be implemented.

state_feedback_control101 When a system is expressed as a state space model, it is normal to design the closed-loop compensator as a state feedback. This file gives an introduction to the topic and relevant MATLAB code to support the associated design and analysis.

optimal_state_feedback_control101 When a system is expressed as a state space model, it is normal to design the closed-loop compensator as a state feedback. This file gives an introduction to the popular method of 'optimal control'.

observer_design_control101 In practice the states are not known and need to be inferred or estimated from available measurements; an observer is used for this process. This fie introduces the concept of the observer quickly and then focuses on how to use MATLAB to support his approach.

tracking_with_statespace_control101 This resource introduces simple methods for dealing with non-zero constant targets and then looks more systematically at how integral action can be incorporated into a state space framework, with an observer and model uncertainty.

FILES USING SIMULINK

state_space_and_simulinkfile1_control101 An introduction to using simulink with state space models and state feedback. Simple scenarios only. Uses Simulink files: state_space_simulinkfile_openloop_control101.slx, state_space_simulink_feedback_control101.slx, state_space_simulink_feedforward_control101.slx.

state_space_and_simulinkfile2_control101 Introduces the concepts of feedforward to improve tracking and observers to estimate states. Uses simulink file state_space_simulinkfile_observer_control101.slx.

state_space_and_simulinkfile3_control101 Introduces integral action into the feedback loop along with an observer. Demonstrates efficacy in the presence of uncertainty. Uses Simulink file: state_space_simulink_integral_control101.slx.