Skip to content
Paid Course Login
Free Course Login
  • About Us
  • Terms and Conditions
  • Privacy Policy
  • Disclaimer
  • Contact Us

MAE Learning

My Automobile Engineering

  • CoursesExpand
    • MBD BasicExpand
      • Introduction to Model Based Development for Automotive Using SIMULINK
      • Introduction to MATLAB Scripting for Automobile Engineering
      • Introduction to Model Based Development for Automotive โ€“ Basic Understanding
      • Learn MBD concept focus on MIL and SIL Testing
    • MBD IntermediateExpand
      • Simulink for Automotive with Model-Based Development Basics
      • MATLAB Scripting with Model-Based Development Basics
      • MATLAB Simulink and Scripting Foundations for Automotive MBD
    • MBD AdvanceExpand
      • A Complete Automotive Model Based Development
    • UDS CourseExpand
      • Complete Beginner Program in Automotive MBD and UDS
      • Introduction To Unified Diagnostic Services (UDS) โ€“ AUTOSAR and MBD Explained
    • EV CourseExpand
      • Introduction to Battery Technology for Electric Vehicle
    • Free Course
    • Courses Demo Video
  • Study MaterialExpand
    • Automotive EmbeddedExpand
      • Automotive Embedded
      • Software Development
    • MATLABExpand
      • MATLAB Interview Q&A
      • Simulink Tutorial
      • M-Scripting Tutorial
    • AUTOSARExpand
      • AUTOSAR Architecture
    • ISO 26262
  • Blogs
YouTube Linkedin Facebook Instagram
MAE Learning
My Automobile Engineering
YouTube Linkedin Instagram
Paid Course Login
Free Course Login
  • Courses
    • MBD Basic
      • Introduction to Model Based Development for Automotive Using SIMULINK
      • Introduction to MATLAB Scripting for Automobile Engineering
      • Introduction to Model Based Development for Automotive โ€“ Basic Understanding
      • Learn MBD concept focus on MIL and SIL Testing
    • MBD Intermediate
      • Simulink for Automotive with Model-Based Development Basics
      • MATLAB Scripting with Model-Based Development Basics
      • MATLAB Simulink and Scripting Foundations for Automotive MBD
    • MBD Advance
      • A Complete Automotive Model Based Development
    • UDS Course
      • Complete Beginner Program in Automotive MBD and UDS
      • Introduction To Unified Diagnostic Services (UDS) โ€“ AUTOSAR and MBD Explained
    • EV Course
      • Introduction to Battery Technology for Electric Vehicle
    • Free Course
    • Courses Demo Video
  • Study Material
    • Automotive Embedded
      • Automotive Embedded
      • Software Development
    • MATLAB
      • MATLAB Interview Q&A
      • Simulink Tutorial
      • M-Scripting Tutorial
    • AUTOSAR
      • AUTOSAR Architecture
    • ISO 26262
  • Blogs

What is the main purpose?

This Simulink model is made to control car wipers using a rain sensor. The wipers should work in different ways based on how much rain is coming. There are three modes:

  • Intermittent (wiper wipes slowly with gap)
  • Low speed (wiper wipes slowly without gap)
  • High speed (wiper wipes fast without gap)

Requirement

  • If rain is less than 40%, wipers go in intermittent mode (slow with gap).
  • If rain is between 40% and 70%, wipers go in low speed (continuous slow).
  • If rain is more than 70%, wipers go in high speed (continuous fast).
  • If rain is 0%, wipers stay off.

What blocks did I use in Simulink?

  • Signal Builder โ€“ this block gives changing RainPercent values with time.
  • Constant โ€“ gives fixed values 40 and 70 for comparison.
  • Relational Operator โ€“ checks if rain is more/less than 40 or 70.
  • Logical Operator (AND) โ€“ finds if rain is between 40 and 70.
  • Switch โ€“ chooses which wiper mode to use: Off, Intermittent, Low, or High.
  • Scope โ€“ shows graphs (one for rain, one for wiper).

Step-by-step working logic

  1. Read RainPercent
    The Signal Builder gives RainPercent (value from 0 to 100) for each time point.
  2. Check rain < 40
    Use Relational Operator block to see if rain is less than 40. If yes, wiper should be in intermittent mode.
  3. Check rain between 40 and 70
    Use two Relational Operators:
    • One checks rain >= 40
    • One checks rain <= 70
      Combine both with AND block to know if rain is in this range.
      If yes, wiper should be in low mode.
  4. Check rain > 70
    Use Relational Operator block to check if rain is more than 70. If yes, wiper goes to high mode.

Mode selection using Switch blocks

  • The first Switch checks if high mode should work (rain > 70). If not, pass to next Switch.
  • Second Switch checks for low mode (rain between 40 and 70). If not, pass to next Switch.
  • Third Switch checks for intermittent mode (rain < 40). If not, wiper is Off.

Mode number mapping:

  • 0 = Off
  • 1 = Intermittent
  • 2 = Low
  • 3 = High

5. View results using Scope
Scope block shows how RainPercent and WiperMode change with time.

High

Low

Inter

What input did I use for testing?

Used Signal Builder to give different rain values at different times (example table):

Time RainPercent
0 10
1 10
2 10
3 30
4 30
5 45
6 45
7 60
8 60
9 75
10 75
11 80
12 80
13 65
14 65
15 55
16 55
17 35
18 35
19 20
20 20
21 10
22 10
23 50
24 50
25 72
26 72
27 38
28 38
29 15
30 15
  • Results from Graph
  • The upper graph line (red) shows rain sensor input changing over time.
  • The lower line (green) shows wiper mode:
    • Green line is low โ€” means intermittent mode (for less than 40% rain).
    • Middle height โ€” low speed (when rain is from 40% to 70%).
    • Top height โ€” high speed (for more than 70% rain).

Conclusion

Logic in the blocks matches the output in the graph:

  • Intermittent mode for rain less than 40%
  • Low speed for rain between 40% and 70%
  • High speed for rain greater than 70%

This matches the logic used in the model perfectly.


7. Why Logic and Graph Match

The blocks used in the logic help in correct decision-making:

  • Relational blocks check if the rain level crosses set points (40 and 70).
    So, when rain goes above or below these points, the mode changes right away.
  • AND block ensures that Low mode only works when both conditions are true. Rain must be greater than or equal to 40. It also needs to be less than or equal to 70.
  • Switch block order gives priority to modes in the right order:
    first High, then Low, and finally Intermittent.

๐Ÿ”ฅ Top Posts
  • Loading...

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 9 other subscribers
  • 48,278 hits
ยฉ 2026 MAE Learning. All Rights Reserved.
โญโญโญโญโญ 4.9/5 Google Reviews

Categories

Archives

Follow Us

Blog Stats

  • 48,278 hits

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 9 other subscribers
Scroll to top
MAE Learning
WhatsApp
Need Help?
Ask here
Loading Comments...
Search