Question
A temperature control system outputs a control signal to a fan that is proportional to the error from a setpoint (SP) temperature value. The output
- A temperature control system outputs a control signal to a fan that is proportional to the error from a setpoint (SP) temperature value. The output function is:
Output = (Temp SP + 0.75)*0.01 volts (temperature in degrees F)
However, the fan never turns on until the temperature exceeds the setpoint by at least one degree, and then does not turn off again until the temperature falls at least 0.5 degrees below the setpoint.
Write the code for a console program (in either Python or C#, preferably C#) that will simulate the control system. Get the setpoint from the user. Then repeatedly ask the user to enter the current temperature, each time outputting the resulting voltage output until the user enters a blank line or other non-numeric value to end the simulation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started