in this video we'll discuss state
observers this concept will help explain
what common filters are and how they
work let's start with an example this is
little Timmy and you want to know about
his mood and how he's feeling right now
however there is no the right way of
measuring his mood
so what he do is give him a cookie and
start observing his facial expressions
this observation helps you estimate his
real mood state observation helps to
estimate something that you can't see or
measure directly throughout the rest of
the discussion if you see something with
a head on it this means that it is
estimated through a state observer so if
the state X is shown with a head then it
is an estimated state next we'll look at
a more solid example you're traveling in
space to discover new planets in order
to get to the planet safely you need to
monitor the internal temperature of your
jet engine if it gets too hot it could
damage your spacecraft however there is
an infeasible way of measuring the
internal temperature since the cells are
placed inside the engine world melt what
you can do is to place the sensor on a
colder surface and measure the
temperature there let's call this
temperature T external and the one you
can't measure but you need to estimate T
internal this is your rocket you're
wondering how high the internal
temperature of the engine is since this
will tell you how you should regulate
the fuel flow to your racket however you
don't have access to the state T
internal instead you can measure T
external the signals that are available
to you are the fill flow and your
measurement how do you estimate the
internal temperature actually you have
access to more information since your
math is pretty good you can drive the
equations that will give you the
mathematical model
Furio system you already know how much
feel you are adding to your records so
if you now input this fill flow to your
mathematical model this will give you an
estimate of your output and also notice
that since you have all the governing
equations you can even calculate the
internal state of the system okay does
this solve your problem now
unfortunately it doesn't no doubt that
you're good at math but in reality the
mathematical model you found is only an
approximation of your real system it is
subject to uncertainties if you had a
perfect model without any uncertainties
and if your real system and your model
had the same initial conditions then
your measurement and estimated output
values will match each other and
therefore the estimated internal
temperature would match the true
internal temperature as well but in real
life this is an unlikely scenario and
therefore the estimated external
temperature won't match the measured
temperature that's why you need to use a
state estimator to estimate your
internal States let's see how a sadist
Mader works here our goal is to match
the estimated external temperature with
the measured external temperature we
know that if these two are equal then
the model will converge to the real
system so the estimated internal
temperature will converge to its true
value what we're trying to do is to
minimize the difference between the
estimated and measured external
temperature does this sound familiar to
you actually we're talking about a
feedback control system where we try to
control the error between the measured
and estimated external temperature at
zero using a controller K if we now
update our diagram on the left-hand side
based on what we've discussed here it
will look like this
this part represents the state observer
by closing the loop with a controller K
around the observer we try to eliminate
the error between the estimated and
measured external temperature such that
the estimated internal temperature is
during to its true value in summary you
can't directly measure the internal
engine temperature but you know how much
feel you're supplying for your racket so
you can run this through your
mathematical model and estimate the
output which you can then use along with
your real measurement to estimate the
internal state of the system the
question is how to choose the controller
gain K such that the error between the
measured and estimated external
temperature is minimized optimally will
provide more insights into this in the
next videos where we'll discuss how
Kalman filters work next let's look at
how we can explain the state observer
mathematically we will generalize the
problem and show the input as you the
output as Y and M States we want to
estimate as X our goal is to drive X hat
to X so we can define the difference
between these values as an error next
let's write down the equations for the
system and the observer if we subtract
these equations from each other this
will give us the error dynamics by
rearranging terms we see that the error
dynamics can be shown by this equation
the solution to this equation is an
exponential function what this means is
if this term is less than zero we're
good because we know that our error will
vanish over time and except will
converge to X at this point you may be
asking if we really need the KC term in
this equation because even without the
feedback loop that adds the KC trap to
the equation we will have a decaying
exponential function for there the
significance of
having a feedback loop around the
observer is that we can control the
decay rate of the error function by
selecting the controller gain K
accordingly however here the decay rate
solely depends on the matrix a and if
there are some uncertainties in the
mathematical model this means you don't
know a exactly therefore you can't
control how quickly the error will
vanish having the feedback controller
gives you more control over this
equation and guarantees a faster
elimination of the error and the faster
the error french's the faster estimated
States accept converge to the true
States x an optimal way of choosing the
gain K is performed through the use of
common filters in the next video we'll
get insights into how common filters
work