Author Topic: Resolving contention - create a unique/random sequence from a 96bit ID? use CRC?  (Read 3881 times)

0 Members and 1 Guest are viewing this topic.

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 21739
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Then why in the world would you need a random number generator with superb statistical properties?

In my opinion, you don't.

It may be worth pointing out that ethernet manages very well with a non-random backoff, exponential backoff to be exact. https://en.wikipedia.org/wiki/Exponential_backoff
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3313
  • Country: ca
I am seeking to avoid are three conditions [for which I have made up arbitrary names]: oscillation, crashing (voltage goes low enough to cause hard reset/fault/'panic stop'), and lockout ('getting stuck in low efficiency regimes of operation').

So, you don't really care if some of the loads are off for too long, do you? In such cases, it is not very hard to maintain MPPT voltage by prioritizing loads.
 

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: us
  • ASCII > UTF8
When the available current output drops the goal is for some of them to gracefully reduce power more than others - but not go offline. (They share to the extent that they can modulate their power consumption - but if pushed too far some should eventually drop offline first)

A fixed identical exponential back-off would probably run into the three conditions I mentioned previously. There is some lag/propagation delay between when the controller decides to do something and its effect on supply voltage/current/etc.

There are various scenarios:

1. Suppose a unit can consume between 250 and 3000mA. The supply can provide 1000mA and there is one unit is consuming 1000mA. A second unit tries to come online drawing 250mA and causes the supply voltage to drop.
2. Same but 250mA.
3. Suppose three units are consuming 1000mA (and saturating the supply), suddenly the supply current drops by half.
3abc. Same but 500mA/333mA/250mA
4. Suppose that supply voltage crashes despite the best efforts of the control loop and resets some or all of the units
5. Suppose three units are consuming 1000mA, suddenly the available supply current doubles.
6. etc.

(these are just hypothetical examples of the problems I think I might be addressing with "good" randomized sequences of parameters)
I don't think there any any fixed magic values/constants for solving the scenarios that the system faces. (ie. a fixed identical startup delay from 'supply voltage good' to 'applying the load' would not work)
« Last Edit: February 02, 2025, 08:38:29 pm by incf »
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4074
  • Country: us
Of course ethernet uses random back off!  It just scales the back off range exponentially.  These serve two different purposes.  The randomization avoids retransmit collisions.  The exponential scaling acts to throttle all nodes when there is contention to avoid the situation where there are many stations trying to transmit and the probability of collisions increases dramatically even with randomization.
 
The following users thanked this post: Siwastaja

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3313
  • Country: ca
If you have one 3000 mA load which consists of 12 250 mA stages, mathematically this may be modelled as 12 independent loads of 250 mA each. You can assign to each of these 12 a fixed threshold where you deem there's enough power to turn this particular load on. So, all the loads will be turning on in the fixed order when the power increases, then off in the same order as power decreases. What is wrong with this?

What kind of loads are they - are they resistive?
« Last Edit: February 02, 2025, 09:46:10 pm by NorthGuy »
 

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: us
  • ASCII > UTF8
A variable output SMPS charging a bank of batteries. (ideally the batteries eventually get changed and units drop their consumption, but, that can take a very long time - and power budgets are such that 'throwing away' a large amount of available power has a meaningful negative impact on the system. Not to mention that it is preferable to have charging spread out over multiple units)

The 'gist' of the problem is that we don't know what the supply voltage or current is supposed to be for max power. It changes randomly and the unit has no visibility of anything except the supply voltage and it's current consumption. So we are stuck with 'guess and check' using random parameters distributed across dozens of units.

As far as I know there is no way of knowing. The best the unit can do is measure the slope of the IV curve, try to consume as much as possible without dropping the supply voltage too low, try perform measurements in a fashion that does not influence and is not influenced by other units, and ideally not be 'too greedy' so that a degree of sharing occurs.

In reality, the act of measuring will influence the measurements of all of the units on the line. As will any reaction to increased or decreased supply voltage. Very easy to get an unintended 'chain reaction' where the system oscillates, crashes, or 'get stuck' in non-ideal region of operation.

Random/unique timings and thresholds are the main line of defense against units interfering with each other and against things unintentionally 'running away'
« Last Edit: February 02, 2025, 09:25:04 pm by incf »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3313
  • Country: ca
A variable output SMPS charging a bank of batteries.

Typically batteries in a bank are connected together and charge simultaneously which helps to maintain the DoD (Depth of Discharge) of the batteries at the same level, which is somewhat important for the bank. This way they don't fight each other. Why do you want them to fight?

The solar controller is typically a buck device which maintains the solar side at MPPT voltage and the battery side is naturally at the bank voltage. This ensures maximum production. When the bank reaches the desired DoD level, the controller simply disconnects - even though the energy is available, you cannot use it.
 

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 172
  • Country: us
  • ASCII > UTF8
Power sources are shared by multiple independent consumers, it just the system architecture.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3313
  • Country: ca
Power sources are shared by multiple independent consumers, it just the system architecture.

I'd say selecting a random number generator with superb statistical properties, as opposed to the simplest RNG won't make any difference.

You need a clever approach to selecting your parameters. You can try to detect oscillations by monitoring voltage and bail out if you suspect that your unit causes them, or move to a different switching frequency. Or, you can even try to dump oscillations by adjusting your switching frequency and phase.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf