State diagram, state table, etc.

Click For Summary

Discussion Overview

The discussion revolves around creating a state diagram and state table for a system involving three sand containers, each equipped with sensors to detect sand levels. Participants explore the necessary states for the system, the type of state machine to use (Moore or Mealy), and the implications of different configurations of states and outputs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants suggest that at least four states are needed: one for each container being empty and one for all containers being full.
  • Others propose that the number of states could be reduced to four since only one bin is refilled at a time, leading to a binary output system for actions.
  • A participant questions the necessity of keeping track of multiple states, suggesting that different configurations of full and empty bins might represent separate states.
  • Another participant emphasizes that states should be treated separately, with each state representing the status of individual containers rather than a general state for all sensors.
  • Some participants express confusion about whether all states can reduce to one, with one participant asserting that this would not constitute a state machine.
  • There is a suggestion that a Mealy machine might be more appropriate, as the next state depends on both the current state and the inputs from the sand levels.
  • One participant proposes a potential configuration of five states, including a "get sand" state, but acknowledges the complexity of managing outputs and inputs in this scenario.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the exact number of states required or the best model to use. Multiple competing views on the structure and function of the state machine remain present throughout the discussion.

Contextual Notes

Participants express uncertainty about the assumptions underlying their state definitions and the implications of different state configurations. There is also a lack of clarity regarding the necessary outputs for the proposed states.

disclaimer
Messages
25
Reaction score
0

Homework Statement



Hi everyone;

I've got a problem to solve that involves three containers which should be filled with sand, each of them has a sensor attached at the same level, so if the amount of sand drops below that limit, it will be refilled. If all were empty, the refilling arm would first go to 1, then 2, and finally 3. Something like this:

2dtrea0.jpg



Homework Equations


No equations.


The Attempt at a Solution




I'm not sure how many states are needed, I'm guessing at least 3 (probably 4: 1st empty, 2nd empty, 3rd empty, all full). Could anyone help me make a state table or state diagram to get things going? Also, would I be better off using a Moore or Mealy model? Anyone know of good resources dealing with similar problems? Help greatly appreciated.
 
Physics news on Phys.org
disclaimer said:

Homework Statement



Hi everyone;

I've got a problem to solve that involves three containers which should be filled with sand, each of them has a sensor attached at the same level, so if the amount of sand drops below that limit, it will be refilled. If all were empty, the refilling arm would first go to 1, then 2, and finally 3. Something like this:

2dtrea0.jpg



Homework Equations


No equations.


The Attempt at a Solution




I'm not sure how many states are needed, I'm guessing at least 3 (probably 4: 1st empty, 2nd empty, 3rd empty, all full). Could anyone help me make a state table or state diagram to get things going? Also, would I be better off using a Moore or Mealy model? Anyone know of good resources dealing with similar problems? Help greatly appreciated.

Start with a truth table. There are 3 bins that can be empty (0) or full (1). Set up a counting on the left of the truth table -- how many lines does that give you? That tells you how many states you will have in your state diagram (well, unless you have a Reset state, but you probably won't in this problem).

http://en.wikipedia.org/wiki/State_machine

.
 
Thanks, maybe I wasn't too precise, the bins don't have to be filled in one cycle. One cycle involves refilling only one bin which narrows the amount of possible states down to 4 I guess. After refilling, the arm returns to the initial state and so on. There would have to be 4 outputs, converting to binary:

00 - no action, stay in initial state
01 - refill 1st
10 - refill 2nd
11 - refill 3rd

Is that correct?
 
How much information do you need to keep about your states? For example, one "state" can be 1 - full, 2 needs refill, 3 needs refill, filler is over bin 2. Is that a separate "state" as opposed to filler over bin 3.. what about both 2/3 needing refills, is that a separate state?
 
I know what you mean, but that is not the case here. We don't have "general" states representing the signals from all the sensors at a time, each of them is treated separately as a state. So state 1 - 1st is empty, state 2 - 2nd empty and so on.
 
Is it possible that all states always reduce to one, no matter if I assume 4 or 8? Either I'm doing something wrong here or I don't know why. Can anyone help? Thanks.
 
disclaimer said:
Is it possible that all states always reduce to one, no matter if I assume 4 or 8? Either I'm doing something wrong here or I don't know why. Can anyone help? Thanks.

You can't reduce to one state. I don't even think it'd be considered a state machine at that point.

Here's some pointers: You'll need to make a mealy machine, as the next state depends on the current state AND the inputs (sand level for each bin). Don't forget, you'll probably have a "get more sand" state, which will be called upon in between the filling of the containers.

Simply draw the problem out. Start at the initial state, and branch off from there. What happens if you get a call for more sand? What if you're currently filling the first OR second container and the third one asks for sand?

You should be able to simplify it down to 8 states; 4 seems insufficient.
 
I guess the possible inputs have to be:

[tex]\bar{X}\bar{Y}\bar{Z}[/tex] 000

[tex]\bar{X}\bar{Y}Z[/tex] 001

[tex]\bar{X}YZ[/tex] 011

[tex]\bar{X}Y\bar{Z}[/tex] 010

[tex]XY\bar{Z}[/tex] 110

[tex]XYZ[/tex] 111

[tex]X\bar{Y}Z[/tex] 101

[tex]X\bar{Y}\bar{Z}[/tex] 100

MarcMTL said:
You can't reduce to one state. I don't even think it'd be considered a state machine at that point.

Here's some pointers: You'll need to make a mealy machine, as the next state depends on the current state AND the inputs (sand level for each bin). Don't forget, you'll probably have a "get more sand" state, which will be called upon in between the filling of the containers.

Simply draw the problem out. Start at the initial state, and branch off from there. What happens if you get a call for more sand? What if you're currently filling the first OR second container and the third one asks for sand?

You should be able to simplify it down to 8 states; 4 seems insufficient.

Thank you. Can't I just assume 5 states then?

A - all full
B - get sand
C - 1st full (entry action: refill)
D - 2nd full (entry action: refill)
E - 3rd full (entry action: refill)

Just a general sketch:

6izi3d.jpg


Is that possible? In such a case the states probably won't reduce to one because of the intermediate state.

EDIT: I suppose adding the "get sand" state requires one more output. I can't possibly have the same input/output combinations branching off to two different states. That just wouldn't make sense at all. Also some kind of output has to tell the system to take some sand first before refilling any of the containers. Whenever I start to think that I'm already there, something always pops up and makes my great theory fall into shambles...
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 49 ·
2
Replies
49
Views
5K
Replies
1
Views
3K
  • · Replies 17 ·
Replies
17
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 25 ·
Replies
25
Views
6K