Beruflich Dokumente
Kultur Dokumente
1) Desenvolva uma funo de controle de lmpada do nvel do combustvel de acordo com a especificao a
seguir.
Considere as ferrramentas da Mathworks para gerar o controlador, valide e gere o C Code para embarcar
em um microcontrolador.
Specification: The fuel level sensor measures the level inside the fuel tank of a vehicle and produces na
analog signal (i.e., a signal proportional to the measured fuel level) within the range of 0 and 10 V. This
analog signal is used as the input for controlling the low-fuel indicator lamp. It is then subjected to time- and
value-discrete sampling in the instrument cluster.
In this process, an analog signal value of 8.5 V is the reading produced by the spare fuel quantity of 5 liters
remaining in the fuel tank. A signal value of 10 V corresponds to an empty tank, and a signal value of 0 V a
full tank. It follows that the low-fuel indicator lamp must be energized in the presence of a signal value
greater than 8.5 V.
To prevent a flickering of the lamp by virtue of it being switched on and off in rapid succession by minute
movements of the fuel volume in the tank, a hysteresis function must be implemented. It is desirable that
the low-fuel indicator lamp be switched off only at the point where a fuel volume exceeding 6 liters,
corresponding to a signal value of less than 8.0 V, has been reached. Figure 2-8 shows the relevant
switching operations.
Based on the foregoing, the only factors of interest in the control of the low-fuel indicator lamp are the
instantsor eventsof overshooting the signal value less than 8.0 V and signal value greater than 8.5
V thresholds, and the previous off or on state of the lamp.