element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
My Project Is Trash
  • Challenges & Projects
  • Design Challenges
  • My Project Is Trash
  • More
  • Cancel
My Project Is Trash
Forum Knock-Knock-Sortin' #2: Some simulations
  • News
  • Forum
  • Projects
  • Enroll
  • Leaderboard
  • Files
  • Members
  • More
  • Cancel
  • New
Join My Project Is Trash to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 4 replies
  • Subscribers 3 subscribers
  • Views 96 views
  • Users 0 members are here
  • KnockKnockSort
  • my-project-is-trash
  • design-challenge
Related

Knock-Knock-Sortin' #2: Some simulations

amgalbu
amgalbu 12 days ago

While waiting for the challengers kit, I spent some time thinking about the best placement of all the components. I came up with this arrangement

image

The accelerometer will be mounted below the plate shown in figure

image

But then I started asking myself where should I place the accelerometer (in the middle of the plate or closer to the border) and how thick the plate should be. A thinner plate shakes more, but may saturate the accelerometer. A thicker plate will barely be moved by light objects. For this reason, I tried to simulate the plate behaviour when hit by an object.

Plate model

A mode is one of the natural ways a structure likes to vibrate. Each mode has a fixed shape and a fixed frequency. Think of a guitar string: it can swing as one arc, or as two half-arcs moving in opposite directions with a still point in the middle, or as three, and so on. Each of those patterns is a mode, and each has its own pitch, set only by the string's length, tension and mass.

A plate works the same way, just in two directions. In the lowest mode the whole plate moves up and down together. In the next ones, still lines called nodal lines cut the plate into patches that move in opposite directions.

image

When an item hits the plate, the plate doesn't move in some new, random way. It rings as a mix of these modes, each one decaying at its own frequency. Where the item lands decides how much of each mode is excited. Where the sensor sits decides how much of each mode it sees: on a nodal line, it feels nothing from that mode.

The classic model for my case is a thin square plate, supported on all four edges: the edges can't move up or down, but they can rotate. Under that assumption each mode has an exact shape:

image

m and n count the half-waves across the plate in x and in y. Each mode rings at

image

where E is Young's modulus, ρ the density, ν Poisson's ratio and h the thickness. These three parameters can be combined in a single value D, called bending stiffness. The stiffness explains how important is the thickness of the plate: if the thickness halves, the plate becomes 8 times softer in bending, with half the mass per area and half the frequency of every mode.

These concepts are the theoretical base of the patterns on the Chladni plates.

The simulation

I implemented these formulas in a small Python simulation. It uses a technique called modal superposition. Instead of solving the plate as a continuous sheet, it describes its motion as a sum of the modes above, and treat each mode as its own little mass on a spring. The impact force F(t) pushes on every mode at once, in proportion to how much that mode moves at the landing point (x₀, y₀):

image
image

Here qₘₙ is how much of mode (m, n) is in the motion at time t, ωₘₙ = 2πfₘₙ is its frequency and ζ its damping. M/4 is each mode's effective mass, a standard result for a simply supported plate, where M is the mass of the free span.

The first step is to build the list of modes. For the plate I considered aluminium with handbook values, and a free span a = 130 mm. Stainless steel was heavier; PETG and polycarbonate is too flexible and may make cans bounce twice.

E, rho, nu = 70e9, 2700, 0.33        # aluminium: Young's modulus, density, Poisson
h, a = 0.002, 0.131                  # thickness and free span (m)
D = E * h**3 / (12 * (1 - nu**2))    # bending stiffness
M = rho * h * a * a                  # mass of the free span, about 93 g

modes = []
for m in range(1, 16):
    for n in range(1, 16):
        w = math.pi**2 * (m**2 + n**2) / a**2 * math.sqrt(D / (rho * h))   # rad/s
        if w / (2 * math.pi) < 40_000:
            modes.append((m, n, w))

def phi(m, n, x, y):                 # the mode shape
    return math.sin(m * math.pi * x / a) * math.sin(n * math.pi * y / a)

This is where modal superposition pays off. A continuous plate has infinitely many points, but each mode is described by just three things: its frequency w, its shape phi and its effective mass M/4. I simulated modes up to 40 kHz.

The item has been simulated with a point mass that arrives at 1.98 m/s (the speed it reaches after a 200 mm fall). It touches the plate through a spring that can only push, never pull. The mass can be easily measured, whereas determining the stiffness was a bit trickier. Since stiffness is measured in N/mm, a placed the can and the PET bottle on a kitchen scale, I pushed on the item to get a minimum amount of deformation and I read the weight. The results are shown in tables below

Item

Mass

Contact stiffness k

Aluminium can, 330 ml

13 g

60 N/mm

PET bottle, 500 ml

20 g

15 N/mm

Given this data, I can now run the simulation:

ph_hit = np.array([phi(m, n, *hit)    for m, n, _ in modes])   # each shape at the landing point
ph_sen = np.array([phi(m, n, *sensor) for m, n, _ in modes])   # ... and at the sensor
w      = np.array([wm for _, _, wm in modes])
q, qd  = np.zeros(len(modes)), np.zeros(len(modes))   # how much of each mode, and its speed
u, ud  = 0.0, 1.98                                    # item position and speed (m/s)
dt     = 1 / 400_000                                  # 2.5 microsecond time step

for i in range(N):
    w_hit = ph_hit @ q                                # plate displacement under the item
    f = k_item * (u - w_hit) if u > w_hit else 0.0    # push-only contact spring
    qdd = f * ph_hit / (M / 4) - 2 * zeta * w * qd - w**2 * q   # all modes at once
    qd += qdd * dt;  q += qd * dt                     # semi-implicit Euler
    ud += -f / m_item * dt;  u += ud * dt             # the item is slowed down
    acc[i] = ph_sen @ qdd                             # what the sensor feels

w_hit is how far the plate surface has moved down at the exact point where the item is touching it, in metres, at the current time step. It’s computed as w_hit = ph_hit @ q, which is the superposition formula w(x, y, t) = Σ qₘₙ(t)·φₘₙ(x, y) evaluated at the landing point.

Then, the force of the impact is calculated. The force is greater than zero while the item is below the plate surface. When they separate, f drops to zero by itself, so the contact time, the peak force and any bounce come out of the model without being imposed.

Then the other elements of the formula (qdd and qd) are computed using a Semi-implicit Euler update, which means that speed is updated before the position. This order looks trivial, but it fixes one important flaw: if the update was performed in the reverse order, the energy would drift.

The last step makes the simulation see what the real sensor sees. The ADXL372 samples at 3200 Hz, so the raw acceleration (computed at 400 kHz by the simulation) is brought down to 8 kHz, filtered to the sensor's 1600 Hz band, and only then is its peak read:

acc_8k  = acc[::50]                       # 400 kHz -> 8 kHz
acc_adx = lowpass(acc_8k, 1600, 8000)     # 4th-order Butterworth, like the sensor's band
peak_g  = abs(acc_adx).max() / 9.81

Each run therefore gives four numbers for a combination of item (can or PET bottle), landing point and sensor spot:

  • how long the item stays in contact
  • the peak force,
  • the peak acceleration in the sensor's band,
  • how long the plate keeps ringing.

As you may guess, the the weakest input in the model is the item stiffness. I can improve simulation by providing a better estimation of the stiffness. The idea is to use the following formula [3]:

The second form gives an easy way to measure k on the real machine: drop each item a few times, read the contact time T off the ADXL372 trace, and work k out.

Plate thickness

First, I run the simulation with different thicknesses. Item was landed slightly off centre. Here are the results

Plate

Mass

First mode

Can: contact / peak

PET bottle: contact / peak

1.0 mm

46 g

285 Hz

3.1 ms / 510 g

4.4 ms / 107 g

1.5 mm

70 g

428 Hz

2.1 ms / 260 g

3.8 ms / 66 g

2.0 mm

93 g

570 Hz

1.7 ms / 175 g

3.7 ms / 35 g

3.0 mm (original)

139 g

855 Hz

1.5 ms / 49 g

3.7 ms / 14 g

Two things to note:

  • Thinner plates blur the items. The 1 mm plate is softer than the can, so the can's contact stretches to 3.1 ms, close to the bottle's 4.4 ms. With the 2 mm plate, they stay clearly apart (1.7 vs 3.7 ms), and contact time is one of the best clues for telling materials apart.
  • The ADXL372 clips at ±200 g. A can on a 1–1.5 mm plate saturates it near the centre. 2 mm stays just under.

Choosing the sensor spot

Where the sensor sits matters more than thickness. On the plate, the sensor reads the impact directly. So the obvious choice is to place the ADXL372 on the plate's underside, and the next question is exactly where.

There are two reuqirements that pull in opposite directions. A can must never push it past 200 g, or the signal clips. On the other hand, a light PET bottle must still be well above the 3 g trigger and the 0.2 g noise of the sensor. This means, for example, that near the centre the plate moves the most, which is great for the bottle but bad for the can.

So for each candidate cell I ran every item at 25 landing points spread over the plate, and kept the worst case: the highest can peak (clipping risk) and the lowest PET peak (weakest signal).

Among the cells where a can never clips, I took the one with the strongest weakest-case bottle signal. Due to the plate's symmetry, 8 cells were candidates. I kept the one closest to the pin to shorten the cable. For this reason, the winner is the spot at (−30, −10) mm from the centre. A can peaks at no more than 189 g there, and a PET bottle at no less than 8.4 g (typically 21 g). 

image

According to this simulation, the waveform shape barely changes from spot to spot. In the ADXL372's 1600 Hz band, a 2 mm plate has really just one active mode, (1,1) at 570 Hz. The next one, at 1425 Hz, sits 33–49 dB lower. Moving the sensor mostly scales the signal, so the accelerometer's item information sits in the contact time and the first few milliseconds, and, hopefully, the microphone will carry enough information to identify the item.

image

Limits and next steps

This is a model, not a measurement, so I treat every number as an educated guess. For sure, the simulation results will be denied by the first tests on the real plate. From this simulation, I will only keep the thickness of the plate (2 mm) because it looks a good compromise among weight, stiffness and movement amplitude when hit by an item.

In the next days, I will receive the parcel with the challengers kit, so I can start to experiment with the ADXL372 and the plate

References

  1. A. W. Leissa, Vibration of Plates, NASA SP-160, 1969 (mode shapes and frequencies of rectangular plates, simply supported case)
  2. W. Goldsmith, Impact: The Theory and Physical Behaviour of Colliding Solids, Arnold, 1960 (contact duration and plate response to an impact)
  3. Analog Devices, ADXL372 datasheet
  • Sign in to reply
  • Cancel
Parents
  • Qbit
    Qbit 1 day ago

    Nice update on the project  amgalbu ! Thank you for walking through the math and the principles !

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • amgalbu
    amgalbu 11 hours ago in reply to Qbit

    Thanks Qbit 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • amgalbu
    amgalbu 11 hours ago in reply to Qbit

    Thanks Qbit 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube