[Home]State Space

HomePage | RecentChanges | Preferences | My Website home page

Showing revision 8

State Space

A system that uses history has a state and the the history has many dimensions or space.

Ohms Law and Electronic circuits

Electronic circuits are components connected by wiring.

The voltage across a resistor is:

 V = R I

Kirchoff had a theory about loops of voltages that sum to zero and currents flowing into a node sum to zero. The wiring is expressed as a net list

 [V] = [R] [K] [I] 

Components map currents to voltages and currents to voltages.

Wiring sums up the currents into the nodes and voltages around loops of components.

Components can be Voltages sources controlled by currents or Currents controlled by voltages.

A trees of controlled voltages can be drawn, and the inverse of a tree drawn for the current.

Equations can be written and itterated numerically to find solutions.

Components can map other parameters.

The tree of components can have many branches.

Thoughts on Distributed state machines

Thoughts on Distributed state machines as used in Object Oriented Programming, and web sites. Here is combinatory simple logic system.

Here is a simple state machine system, as outputs are fed back to provide history.

Here is a simple state machine system, as outputs are fed back to provide history. A latch is added to clock the state machine.

Note: In software, it is probably impossible to not have a latch.

If the state machine is written in a function called ProcessTimeSlice(), then every time the function is called, it is like clocking the state machine latch. In further examples, they will all be latched. There may even be more than one latch, each clocked by their own bit of software.

Here is a state machine where the state information is stored in more than one place. There is an assumption that the state machine is not run continously. Often it is only run when the inputs change or on a regular time tick.

Getting the state from a database may require a data base query. Maybe the state is held in a local copy, and either the database is responsible for pushing down updates or the state machine is responsible for polling for updates.

In the diagram above, any available processor can be given the code for the combinationatory logic and run it. It will need to be given access to the state variables, and to avoid corruption, these will be locked for sole use by the processor. It will need a way of storing the state variables back into any central data store. so:

localCopyOfStateVariables = StateVariables

get from array:

localCopyOfStateVariables = StateVariables[ instanceWanted ]

get from any where:

localCopyOfStateVariables = getStateVariables( instanceWanted ) ... putStateVariables( instanceWanted )

Here is an outline of running with locks:

lockStateVariables( instanceWanted ) localCopyOfStateVariables = getStateVariables( instanceWanted ) localCopyOfStateVariables = runCombinatoryLogic( localCopyOfStateVariables ) putStateVariables( instanceWanted ) unlockStateVariables( instanceWanted )

Here is a state machine used to model analogue electronics.

State or Event

Look at the history and inputs and try and identify an event to process.

Do you order the code for a state machine by state or by event?


HomePage | RecentChanges | Preferences | My Website home page
This page is read-only | View other revisions | View current revision
Edited November 6, 2021 10:33 am by dougrice.plus.com
Search: