[MUSIC] With the models of finite state machines and of the physical part of a cyber physical system, now we can write down a full cyber physical system with what we have learned. Let's consider the problem of controlling the temperature of a room again. The dynamics of the temperature were introduced in an earlier video and given by the following expression. Where this aT, Tr and T delta were properly defined constants and u is a signal that can only take values in 0 and 1. That means that when it's 0 the heater is off, and when it's 1 the heater is on. This can be modeled as a cyber physical system, physical path only and we would like to do right now would be to come up with a model here that will control the temperature to this particular T min T max range we mentioned in a previous video. So here we'll have the cyber, and our goal would be design an algorithm, That keeps T within T min and T max, where this constants T min and T max which is the range of temperature we would like to have is related to these constants in the following way. The reason of this constant will become clear when we start the simulations and it will in particular guarantee that these thresholds T min and T max can be thresholds where the temperature kind of stay within. So how we keep TE (Tmin and Tmax)? Well, based on what we already learned when we illustrated the finite state machine with [INAUDIBLE], we can now come out with the following logic First we can say that when the heater is on we will define a variable q been equal to ON, and when q is equal to OFF We have that the heater is OFF, okay? So this will define my state of a finite state machine and from here we notice that Q now will be on and off. This is the set of values where q and can take values from and a logic will be if q is equal to ON and the temperature T is larger or equivalent to max then we would like to have is q+ equal to OFF. And if q is equal to OFF and T is less or equivalent to Tmin then we will have q+ equal to ON. So that's our logic. And that somewhat suggest how the transition function should change. It looks like these are the terministic transition function and moreover the logic is telling us what are the conditions for transition? So what we have learned these conditions could go in to the definition of l while these assignments after the events will go in to the definition of delta. Since now the value of the state is on and off, but the input that I need to apply to the temperature system is 001, this output here which we label as theta for the finite-state machine, we'll need to convert on of 2, 0 and 1, okay? So this is how we can now write down a finite-state machine using the objects that we will find in a previous video. [MUSIC]