Alignment jitter suppression

trueninjalo

Lifetime Supporting Member
Join Date
Oct 2015
Location
Ohio
Posts
40
Background
I have a web edge sensor on each side of a fabric web. After adding material to the web, I cut the excess material with knives aligned to the edge of the base fabric by using the web edge sensor readings. There are some small threads and inconsistencies that extend beyond the web edge affecting the knife positioning causing trim anomalies. I had drawn a picture but I am unable to access imagur or photo bucket from our intranet. So I added it as an attachment.

Scope
Use an averaging of the edge senor reading to minimize the effect of the web edge anomalies. Initial thought is to use an array of 50ms scan rates over 5 seconds (REAL[100]) then continuously average this array. A FIFO should be able to do this but is there a better way? Is this the wrong approach? Thoughts are welcome and appreciated.

System Info
Logix Designer 5000 V 28.00
1756-L71
1756-IF16 (slot 6) Web Sensor(left 0,Right 1), Knife position feedback (lower left 2, Lower right 3, Up left 4, up right 5)
1756-OA16I (slot 7) Knife position Servo (Up left Fwd 1, Up Right Rev 2, Up right Fwd 3, Low Left Rev 4, Low left Fwd 5, Low right Rev 6, Low right fwd 7, up left rev 8)

I didn't set this up so don't scream at me for the plug in locations lol

trimknife.jpg
 
Last edited:
Sounds like your idea of averaging the last 100 readings is a good way to start. One suggestion I have is to possibly ignore any outliers which may radically shift your average calculation. This would prevent any noisy or erroneous readings from boogering up your average.

I'm cant remember exactly how to do this off the top of my head but here's a thought:
- For your first scan, you could fill all 100 elements with the initial reading.
- Create a range based on your average reading +/- x%
- Any new value outside of your range gets ignored and a counter gets incremented
- Any new value within range gets added to the array and the counter gets reset
- If the counter increments x times in a row, assume these are good values and add to the array.

Hope this helps.
O-H-
 
If both the number of anomalous readings is relatively small compared to all samples, and the deviation from nominal is relatively small, then a moving average filter should be sufficient for the task. The posted images would imply these assumptions are reasonable.

In my view, the FIFO/AVE approach in ladder programming is the most readable and easy to maintain. There are other less computationally intense approaches to the moving average, as will as other filters with less memory storage requirements as well. I prefer the finite response of the moving average in most circumstances.
 
Last edited:
Thank you both. I like the idea of the percentage range and counter addition as the web has a tendency to walk left and right depending on how well it was pre-rolled. This "walk" however seems like it would not be recognized fast enough if I am averaging over a period of 5 seconds. Perhaps I should increase my scan rate to reduce the overall averaging time. This could give me faster response times. Am in missing something in this hypothesis?
Again thank you all for your time.

RonJohn... I-O
 
Last edited:
Why would you want to average the trim anomalies? This makes no sense.
the knife follows the anomalies. I want the edge to be a straight cut. Without filtering the sensor signals the cut edge is not straight. I hope this makes more sense.
Thank you.
 
This is what I have come up with for the FIFO and Average portion.
I am currently using the source as an alias to an analog input. I still need to setup the % range section of the code. I am not entirely sure how I will do that yet but when I am done I will post it. Thank you again for your help.
 
Am in missing something in this hypothesis?

If you will get more "good" data by increasing scan rate with the same buffer size, then that would likely help the situation. It can be a challenging problem to determine which samples are good and which are bad as they come in. For example, it will be especially difficult if your anomalous threads are of the same magnitude as a step change from walking, requiring complication such as counters and back-filling the buffer.

Another tool is the file standard deviation (STD), that could help with detecting fliers.

One last comment, related to the code, is that the rung with AVE should either precondition with the FIFO done bit, or move the FIFO size into the AVE size before the AVE instruction (i.e., MOV xxx_FFL_U_CTRL.POS xxx_AVE_CTRL.LEN).

Actually as I write this, I see you need a different control word for the AVE instruction than for the FIFO instructions, and different one-shot bits.
 
Last edited:
NO! This makes no sense!!! Your thinking is defective.

the knife follows the anomalies. I want the edge to be a straight cut. Without filtering the sensor signals the cut edge is not straight. I hope this makes more sense.
Thank you.
Why not find a median? This will ignore spurious readings.
The median is the value where 50% are higher and 50% are lower.
You could change the 50% to 10% too.
This requires constant sorting though.

Another simple method is to use two low pass filters. One has a long time constant that doesn't respond quickly to new input and the other responds quickly to new input

Code:
IF NEW_INPUT > FILTERED_VALUE
       K:=0.01
ELSE
       K:=0.1
FILTERED_VALUE = FILTERED_VALUE+K*(NEW_INPUT-FILTERED_VALUE)
 
I often use the low pass filter formula that Peter has in his "defective" post. He's adding the wrinkle of using different filter constants depending on whether the value is rising or falling. That may or may not be necessary, but the formula itself is the main thing. I've done averaging, but the low pass filter provides a similar function without so much setup and code.
 
While this is a plc forum, I remember back 30 years ago, that this was done mechanically to keep the fabric centered prior to reaching the trimmers. I can only remember a company called Mahlo that made straighteners that did this. Maybe that option will work or may not even be available these days.
 

Similar Topics

Hello, I have a requirement to manage the text alignment dynamically. So, for example: 1. English Texts should be displayed from Left in...
Replies
0
Views
90
Hi, I'm not looking for code but rather some suggestions on how to approach this problem. I can see myself writing messy code when surely there...
Replies
10
Views
2,627
Hello, all! This is a PLC indirect question. I have trailers with conveyors inside which connect to dock conveyors when parked. The conveyors...
Replies
7
Views
2,642
Hello everyone, PFA. I am not very used to of the Insight system. But this is a general question, Since the 0 line is offset from the right edge...
Replies
0
Views
1,018
Anyone else have the problem where certain things aligned in the development environment do not align properly when testing the display or at...
Replies
7
Views
2,452
Back
Top Bottom