05-28-2020 07:54 AM
Hello everyone.
I am trying to make a simulation on power consumption of electric appliances using LabVIEW. The thing I want to do is to create numeric control in which I enter power in watts and if it is in between range of bulb power consumption it will turn on LED. Similarly if if increase power then another LED labelled as fan should turn on at some specific range. The main issue is lets suppose if I put power equals to 3 bulbs power consumption and on the other hand it is also equals to fan power consumption then how my program can decide what is actually on i.e. 3 bulbs or 1 fan. and what approach should I use to make such thing i.e. producer-consumer loop or flat sequence or like what? and what if I turn on three bulbs and then one fan? if anyone have already done some work on it then please help.
05-28-2020 10:39 AM - edited 05-28-2020 10:40 AM
Hello,
how my program can decide what is actually on i.e. 3 bulbs or 1 fan.
The program executes what you decide to do. Do you prefer to have 3 bulbs or a fan ?
For each new power consumption there will be a sequence of tests which determines which LED to turn on. Before coding anything you need to know what you want and have an idea of the steps. You need an algorithm
Example:
- Let's say you prefer to have a fan rather than 3 bulbs.
- bulb = 100 W. Called BW
- fan = 300 W. Called FW
- radiator = 1000 W. Called RW
- input power consumption = 450 W. Called P
1st test: P/RW = <0 radiator.
New P=P-(0*RW)=450
2nd test: P/FW = 3,x fans.
New P=P-(3*RW)=150
3rd test: P/BW = 1,x bulbs
New P=P-(1*BW)=50
Power consumption = 1 fan, 3 bulbs and 50 Watts
Producer-consumer architecture does not seem necessary with the information provided. It is useful when you acquire data very regularly.
If the power consumption is always written by the user then a user event in a while loop is a good idea.
Most of the time a flat sequence is unnecessary. Think Dataflow
Yddet
05-31-2020 03:46 AM
No it was not like that, may be my English is not that good to explain the statement.
As you said if power consumption is 450 watt with 1 fan and 3 bulbs as on condition, yet there is another possibility that 2 fans are on and 50 watts extra. How it can be decided?
I think there must be a sequence of appliances to turn on and off.
For example, if 50 watt bulb is turn on then this must record a bulb is on similarly then other 50 watt bulb is on. Now power rises in two steps. So even there is a fan that consumes 100 watts, the system will indicates its two bulbs not a fan. Also when the power consumption is jumps straight to 100 watts then it will indicates a fan is on, not two bulbs. This is what I actually want. If this simple problem is solved then we can add as many appliances as we can.....
05-31-2020 10:24 AM
@ARahman786 wrote:
. Also when the power consumption is jumps straight to 100 watts then it will indicates a fan is on, not two bulbs. This is what I actually want. If this simple problem is solved then we can add as many appliances as we can.....
How do you know that the you don't have a situation where two bulbs were turned on simultaneously causing a 100W jump at once?
Exactly what are you measuring?
How are you controlling bulbs versus fans? Physical external switches? Programmatically through LabVIEW and a digital output to turn on some relays?
It sounds like you are only measuring the power consumed, it is controlled externally in a way that LabVIEW can't track, and you are trying to make the program smart enough to guess what is actually on or not.
In your original message you said, "make a simulation on power consumption of electric appliances". Why are you doing a simulation? (So does that mean there really aren't any physical devices?)
Why do you care whether 3 bulbs are on or 1 bulb and 1 fan? What are you trying to do with this information?
05-31-2020 11:23 PM
Yes I am trying achieve a simulation first. Let me explain again. If we have a power meter that can read power consumption of different appliances at home. Then can we build such a system that can detect exactly which appliance is on. since we may have many appliances but to make thing more simpler I used example of 3 bulbs and 1 fan. The only thing that bothers me is overlapping of power reading. Like in general we don't push two bulb buttons at home at same time 😅. so I think when it goes sequence wise like first 50W then 50W and then 50W . The program will say its 150W power consumption and three bulbs are on. But on the other hand if power reading goes straight to 150 watts then again power is overlapping but our program will tell us it is a fan not three bulbs. Similarly make combinations of bulbs and fans on/off and then we can add as many appliances as we can. In the end we can apply this software in real time as well. I think its more or less AI type. But before doing anything I want expert advice what they think about it.
06-01-2020 07:47 AM
It may be an unsolvable problem.
All you can do is try to look at the distinctive changes from one power change to another. When you keep track of the total power in a shift register and see a change in the new loop iteration vs. the previous, the size of the jump should give you a clue.