This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Temperature Control in a Shower

This example shows how to use a fuzzy-logic inference system in a Simulink® model.

Required Product

To run this example, Simulink® is required.

if ~fuzzychecktoolboxinstalled('simulink')
    disp('Simulink(R) is required to run this example.')

Simulink Model

There are two inputs to the fuzzy controller: the water temperature and the flow rate. The controller uses these inputs to manipulate the hot and cold valves.



Simulate controller response with periodic changes in the setpoints of the water temperature and flow rate.

set_param('shower/flow scope','Open','on','Ymin','0','Ymax','1');
set_param('shower/temp scope','Open','on','Ymin','15','Ymax','30');

Was this topic helpful?