Undyne's attacks ramp up in difficulty as her hp decreases or as time passes. In impossible mode(and also in normal mode), her attacks reach the maximum level of difficulty when she is below 1/3 hp left(or when a lot of turns pass, but usually, unless you keep skipping turns, you'll reach that part before because of her low hp). At that point you'll be facing against the hardest attacks in the game, but she also has low health, so if you manage to hit her just a few more times, you'll end the difficult part immediatly.