WOLFRAM SYSTEM MODELER

TemperatureStateEstimation

Analyze robustness of a state estimator

Diagram

Wolfram Language

In[1]:=
SystemModel["EducationExamples.ElectricalEngineering.TemperatureStateEstimation"]
Out[1]:=

Information

This model analyzes the robustness of a state estimator, taking measurements from an electrical radiator. The state estimator blends together different measurements and a model of the system in order to estimate the current radiator temperature.

The model contains a small electric radiator that is powered by a 24V voltage source. The radiator element heats up the body of the radiator. The temperature of the radiator will also be affected by the ambient temperature, which will increase during the simulation. Three measurements are taken continuously: radiator voltage, ambient temperature and a direct measurement of the radiator temperature. Using the Modelica.Noise library, a white noise is added to each of the measurements. All noisy measurements are fed into a Kalman filter that estimates the radiator temperature. 

Noise Distributions

Expectation value and standard deviation for the noise distributions can be changed by highlighting the noise sources and changing the mu and sigma parameters, respectively. The Kalman filter was created assuming the standard values for the noise distributions in the model are true. By increasing the noise or any other parameter in the model, you can see how robust the filter is to modeling errors.

Simulation

To simulate the model, click the Simulate button:

Plot the Results

When first simulating the model, you will see the Temperature Estimation plots:

In the plot, the actual temperature is compared to the temperature estimated by the Kalman filter. In the top plot, the noisy measurements taken by the temperature sensor are also displayed.

The other available plots Ambient Temperature Measurement, Temperature Measurement and Voltage Signal focus on measurement, each showing the measured signal, the actual signal and the added noise.

Components (17)

globalSeed

Type: GlobalSeed

Description: Defines global settings for the blocks of sublibrary Noise, especially a global seed value is defined

temperatureMeasurementNoise

Type: NormalNoise

Description: Noise generator with normal distribution

voltageControlNoise

Type: NormalNoise

Description: Noise generator with normal distribution

voltageControlSignal

Type: Constant

Description: Generate constant signal of type Real

voltageControlInput

Type: Sum

Description: Output the sum of the elements of the input vector

temperatureMeasurement

Type: Sum

Description: Output the sum of the elements of the input vector

ambientTemperatureSignal

Type: Ramp

Description: Generate ramp signal

ambientTemperatureMeasurementNoise

Type: NormalNoise

Description: Noise generator with normal distribution

ambientTemperatureMeasurement

Type: Sum

Description: Output the sum of the elements of the input vector

stateEstimator

Type: StateSpace

Description: Linear state space system

heatCapacitor

Type: HeatCapacitor

Description: Lumped thermal element storing heat

heatingResistor

Type: Resistor

Description: Ideal linear electrical resistor

temperatureSensor

Type: TemperatureSensor

Description: Absolute temperature sensor in Kelvin

thermalConductor

Type: ThermalConductor

Description: Lumped thermal element transporting heat without storing it

ground

Type: Ground

Description: Ground node

signalVoltage

Type: SignalVoltage

Description: Generic voltage source using the input signal as source voltage

ambientTemperature

Type: PrescribedTemperature

Description: Variable temperature boundary condition in Kelvin